php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71922 Crash on assert(new class{});
Submitted: 2016-03-29 16:50 UTC Modified: 2016-04-02 09:20 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: bugs dot php dot net at ss dot st dot tc Assigned: nikic (profile)
Status: Closed Package: Reproducible crash
PHP Version: 7.0.4 OS: Linux, OSX
Private report: No CVE-ID: None
 [2016-03-29 16:50 UTC] bugs dot php dot net at ss dot st dot tc
Description:
------------
assert(new class{});

Actual result:
--------------
Segfault

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-03-29 16:57 UTC] bugs dot php dot net at ss dot st dot tc
-: bugs dot php dot net at ss dot st dot tcc +: bugs dot php dot net at ss dot st dot tc
 [2016-03-29 16:57 UTC] bugs dot php dot net at ss dot st dot tc
What's noticeable, the code doesn't even have to be executed:

1.php:
------------------------
<?php 
function you_dont_have_to_call_me() {
    assert(new class{});
}
------------------------

2.php
------------------------
<?php 
include '1.php';
------------------------

> php 2.php
Segmentation fault: 11
 [2016-03-29 17:22 UTC] nikic@php.net
-Assigned To: +Assigned To: nikic
 [2016-03-29 17:30 UTC] nikic@php.net
Automatic comment on behalf of nikic
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ed06d130f70691cb50bed9dc7b9db38970a9d408
Log: Fixed bug #71922
 [2016-03-29 17:30 UTC] nikic@php.net
-Status: Assigned +Status: Closed
 [2016-03-29 17:33 UTC] bugs dot php dot net at ss dot st dot tc
Thanks Nikita!
 [2016-04-02 09:20 UTC] bugs dot php dot net at ss dot st dot tc
Wasn't included in 7.0.5 :(
 [2016-07-20 11:32 UTC] davey@php.net
Automatic comment on behalf of nikic
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ed06d130f70691cb50bed9dc7b9db38970a9d408
Log: Fixed bug #71922
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 08:01:29 2024 UTC