php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43968 Extending internal class causes a crash
Submitted: 2008-01-29 16:53 UTC Modified: 2008-01-29 20:03 UTC
From: mkoppanen@php.net Assigned: dmitry (profile)
Status: Closed Package: Reproducible crash
PHP Version: 5.2CVS-2008-01-29 (snap) OS: Debian
Private report: No CVE-ID: None
 [2008-01-29 16:53 UTC] mkoppanen@php.net
Description:
------------
PHP 5.2.5 and current snapshot (php5.2-200801291330) cause a crash when extending an internal class and terminating the script with die(); or fatal error.

This does no happen with debug build or with USE_ZEND_ALLOC=0

Reproduce code:
---------------
class a extends arrayobject 
{
} 
die();

Expected result:
----------------
No output

Actual result:
--------------
/opt/php5-cvs/bin/php -r 'class a extends arrayobject {} die();'
zend_mm_heap corrupted


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-01-29 17:14 UTC] felipe@php.net
I reproduced in 5.3 (CVS), the problem is occuring with all classes. (not only internal)
 [2008-01-29 17:49 UTC] felipe@php.net
The problem isn't with classes. Just a simple "valgrind php" show the errors.
 [2008-01-29 20:03 UTC] dmitry@php.net
The crash occurs because of GCC optimizer bug.
 [2008-01-29 20:03 UTC] dmitry@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 27 09:00:03 2025 UTC