From: bobwei9 at hotmail dot com Operating system: Mac OS X Mountain Lion PHP version: master-Git-2013-02-22 (Git) Package: Reproducible crash Bug Type: Bug Bug description:__destruct loop segfaults
Description: ------------ A destruct loop segfaults due "KERN_PROTECTION_FAILURE". Please add some sort of counter (until 1000 for example) to every destructor to avoid segmentation faults. ____ It is not funny when someone thinks he has to produce endless core dumps... Test script: --------------- <?php class getDestructed { public function __destruct() { new self; } } $class = new getDestructed; Expected result: ---------------- Fatal error: Allowed memory size of %ul bytes exhausted at Zend/zend_execute.h:%s (tried to allocate %i bytes) in xxx on line 3 or some restriction by a counter Actual result: -------------- #1 0x0000000100823ce7 in zend_call_function (fci=0x7fff5f400578, fci_cache=0x7fff5f400500, tsrm_ls=0x1016110c0) at zend_execute_API.c:941 #2 0x000000010086ab02 in zend_call_method (object_pp=0x7fff5f4006e8, obj_ce=0x1015e22a0, fn_proxy=0x7fff5f4006f8, function_name=0x100e47510 "__destruct", function_name_len=10, retval_ptr_ptr=0x0, param_count=0, arg1=0x0, arg2=0x0, tsrm_ls=0x1016110c0) at zend_interfaces.c:97 #3 0x00000001008804f8 in zend_objects_destroy_object (object=0x1027f5be0, handle=2483, tsrm_ls=0x1016110c0) at zend_objects.c:123 #4 0x000000010088e60b in zend_objects_store_del_ref_by_handle_ex (handle=2483, handlers=0x100ef1188, tsrm_ls=0x1016110c0) at zend_objects_API.c:207 #5 0x000000010088e374 in zend_objects_store_del_ref (zobject=0x1027f5b60, tsrm_ls=0x1016110c0) at zend_objects_API.c:173 #6 0x0000000100839c66 in _zval_dtor_func (zvalue=0x1027f5b60, __zend_filename=0x100e49301 "Zend/zend_execute.h", __zend_lineno=81) at zend_variables.c:54 #7 0x00000001008f4e7a in i_zval_ptr_dtor [inlined] () at /private/var/root/php-patch/Zend/zend_execute.h:35 #8 0x00000001008f4e7a in ZEND_NEW_SPEC_HANDLER (execute_data=0x1027402f0, tsrm_ls=0x1016110c0) at zend_variables.h:760 #9 0x000000010089147f in execute_ex (execute_data=0x1027402f0, tsrm_ls=0x1016110c0) at zend_vm_execute.h:356 #10 0x0000000100892390 in zend_execute (op_array=0x1015e3790, tsrm_ls=0x1016110c0) at zend_vm_execute.h:381 [...an infinite time of the same error message...] -- Edit bug report at https://bugs.php.net/bug.php?id=64280&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64280&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64280&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64280&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=64280&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=64280&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=64280&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=64280&r=needscript Try newer version: https://bugs.php.net/fix.php?id=64280&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=64280&r=support Expected behavior: https://bugs.php.net/fix.php?id=64280&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=64280&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=64280&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=64280&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64280&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=64280&r=dst IIS Stability: https://bugs.php.net/fix.php?id=64280&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=64280&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=64280&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=64280&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=64280&r=mysqlcfg