Bug #51822 [Asn->Csd]: Segfault with strange __destruct() for static class variables
Edit report at http://bugs.php.net/bug.php?id=51822&edit=1
ID: 51822
Updated by: dmitry@php.net
Reported by: daan at react dot com
Summary: Segfault with strange __destruct() for static class
variables
-Status: Assigned
+Status: Closed
Type: Bug
Package: Scripting Engine problem
Operating System: Debian Etch
PHP Version: 5.2.13
Assigned To: dmitry
New Comment:
This bug has been fixed in SVN.
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.
Previous Comments:
------------------------------------------------------------------------
[2010-06-10 13:45:53] dmitry@php.net
Automatic comment from SVN on behalf of dmitry
Revision: http://svn.php.net/viewvc/?view=revision&revision=300350
Log: Fixed bug #51822i (Segfault with strange __destruct() for static
class variables)
------------------------------------------------------------------------
[2010-05-14 15:20:44] daan at react dot com
Reference to bugreport at xdebug:
http://bugs.xdebug.org/view.php?id=580
------------------------------------------------------------------------
[2010-05-14 15:14:51] daan at react dot com
Hmm looks like it might be xdebug related..
"#1 0xb739e2f2 in xdebug_execute (op_array=0x9ce5214) at
/tmp/pear/temp/xdebug/xdebug.c:1392"
I tried it on a non-xdebug php 5.2.10, and that had no problems - the
5.3.1 I tested with did not have xdebug installed either.
Will throw the bug that way then.. apologies for the misdirected bug
report!
------------------------------------------------------------------------
[2010-05-14 15:04:40] daan at react dot com
JIC you still need it - a trace:
#0 0x0837f473 in zend_hash_find (ht=0x9ce0398, arKey=0xb73babed "",
nKeyLength=5, pData=0xbfc0ea7c)
at /usr/src/php-5.2.13/Zend/zend_hash.c:880
#1 0xb739e2f2 in xdebug_execute (op_array=0x9ce5214) at
/tmp/pear/temp/xdebug/xdebug.c:1392
#2 0x08368c20 in zend_call_function (fci=0xbfc0ebec,
fci_cache=0xbfc0ec10)
at /usr/src/php-5.2.13/Zend/zend_execute_API.c:1039
#3 0x08387b2c in zend_call_method (object_pp=0xbfc0ec94,
obj_ce=0x9ce3c0c, fn_proxy=0xbfc0ec98,
function_name=0x8638cb8 "__destruct", function_name_len=10,
retval_ptr_ptr=0x0, param_count=0, arg1=0x0,
arg2=0x0) at /usr/src/php-5.2.13/Zend/zend_interfaces.c:88
#4 0x0838da67 in zend_objects_destroy_object (object=0x9ce4898,
handle=1)
at /usr/src/php-5.2.13/Zend/zend_objects.c:101
#5 0x08390d30 in zend_objects_store_del_ref_by_handle (handle=1)
at /usr/src/php-5.2.13/Zend/zend_objects_API.c:198
#6 0x08390d75 in zend_objects_store_del_ref (zobject=0x9ce22c4)
at /usr/src/php-5.2.13/Zend/zend_objects_API.c:169
#7 0x08367ee9 in _zval_ptr_dtor (zval_ptr=0x9ce4928) at
/usr/src/php-5.2.13/Zend/zend_variables.h:35
#8 0x0837e245 in zend_hash_destroy (ht=0x9ce48ec) at
/usr/src/php-5.2.13/Zend/zend_hash.c:526
#9 0x0838dc07 in zend_object_std_dtor (object=0x9ce3284) at
/usr/src/php-5.2.13/Zend/zend_objects.c:45
#10 0x0838dc40 in zend_objects_free_object_storage (object=0x9ce3284)
at /usr/src/php-5.2.13/Zend/zend_objects.c:122
#11 0x08390d52 in zend_objects_store_del_ref_by_handle (handle=2)
at /usr/src/php-5.2.13/Zend/zend_objects_API.c:211
#12 0x08390d75 in zend_objects_store_del_ref (zobject=0x9ce48d4)
at /usr/src/php-5.2.13/Zend/zend_objects_API.c:169
#13 0x08367ee9 in _zval_ptr_dtor (zval_ptr=0x9ce46f8) at
/usr/src/php-5.2.13/Zend/zend_variables.h:35
#14 0x0837e245 in zend_hash_destroy (ht=0x9ce4548) at
/usr/src/php-5.2.13/Zend/zend_hash.c:526
#15 0x0836c123 in destroy_zend_class (pce=0x9d1a78c) at
/usr/src/php-5.2.13/Zend/zend_opcode.c:184
#16 0x0837de9c in zend_hash_apply_deleter (ht=0x9b136a0, p=0x9d1a780)
at /usr/src/php-5.2.13/Zend/zend_hash.c:611
#17 0x0837dfcb in zend_hash_reverse_apply (ht=0x9b136a0,
apply_func=0x83675b0 <clean_non_persistent_class>)
at /usr/src/php-5.2.13/Zend/zend_hash.c:760
#18 0x0836a8b6 in shutdown_executor () at
/usr/src/php-5.2.13/Zend/zend_execute_API.c:291
#19 0x083752e4 in zend_deactivate () at
/usr/src/php-5.2.13/Zend/zend.c:860
#20 0x083356eb in php_request_shutdown (dummy=0x0) at
/usr/src/php-5.2.13/main/main.c:1504
#21 0x083e0872 in main (argc=2, argv=0xbfc0f4f4) at
/usr/src/php-5.2.13/sapi/cli/php_cli.c:1346
------------------------------------------------------------------------
[2010-05-14 15:00:16] felipe@php.net
In fact I got something on Valgring log:
Invalid write & read and:
==5285== Address 0x65f0ba4 is 4 bytes inside a block of size 256
free'd
==5285== at 0x4024866: free (vg_replace_malloc.c:325)
==5285== by 0x83ACBD6: _efree (zend_alloc.c:2308)
==5285== by 0x83CD787: zend_ptr_stack_destroy (zend_ptr_stack.c:74)
==5285== by 0x83BE48B: shutdown_executor (zend_execute_API.c:283)
==5285== by 0x83D05D9: zend_deactivate (zend.c:860)
==5285== by 0x836D12B: php_request_shutdown (main.c:1504)
==5285== by 0x8459950: main (php_cli.c:1346)
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/bug.php?id=51822
--
Edit this bug report at http://bugs.php.net/bug.php?id=51822&edit=1
Thread (8 messages)