|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-10-26 13:22 UTC] flavius dot as at gmail dot com
Description: ------------ PHP 5.3.0 crashes when a class is implementing an interface declared in another namespace Reproduce code: --------------- Hi I am sorry, I was unable to isolate the bug and create a PoC. However the code (which is rather small) can be found at svn://yet-another-project.com/projects/yap. Rev 1. is working, but the crashing code is commented out, Rev.2 crashes when issuing /trunk/tests/runtests.sh. The tests were written with PHPUnit 3.4.1 in mind. The error message when running the testsuite through /usr/bin/phpunit is: ./runtests.sh: line 3: 16512 Segmentation fault phpunit --bootstrap bootstrap.php --configuration phpunit.xml testunit/ But when issuing /usr/bin/php /usr/bin/phpunit --bootstrap bootstrap.php --configuration phpunit.xml testunit/ I only get: Segmentation fault See the diff between r1 and r2. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 29 02:00:01 2025 UTC |
Done. The output: Reading symbols from /home/flav/php-5.3.0/sapi/cli/php...done. (gdb) run /usr/bin/phpunit --bootstrap bootstrap.php --configuration phpunit.xml testunit/ Starting program: /home/flav/php-5.3.0/sapi/cli/php /usr/bin/phpunit --bootstrap bootstrap.php --configuration phpunit.xml testunit/ [Thread debugging using libthread_db enabled] Program received signal SIGSEGV, Segmentation fault. 0x00000000007d93db in ZEND_ADD_INTERFACE_SPEC_CONST_HANDLER (execute_data=0x7ffff65529a8) at /home/flav/php-5.3.0/Zend/zend_vm_execute.h:892 892 if (!(iface->ce_flags & ZEND_ACC_INTERFACE)) { (gdb) bt #0 0x00000000007d93db in ZEND_ADD_INTERFACE_SPEC_CONST_HANDLER (execute_data=0x7ffff65529a8) at /home/flav/php-5.3.0/Zend/zend_vm_execute.h:892 #1 0x00000000007d6b50 in execute (op_array=0x161f078) at /home/flav/php-5.3.0/Zend/zend_vm_execute.h:104 #2 0x00000000007a38de in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/flav/php-5.3.0/Zend/zend.c:1188 #3 0x000000000072ed19 in php_execute_script (primary_file=0x7fffffffe1e0) at /home/flav/php-5.3.0/main/main.c:2196 #4 0x000000000088c885 in main (argc=7, argv=0x7fffffffe438) at /home/flav/php-5.3.0/sapi/cli/php_cli.c:1188After some debugging, I came to the conclusion that it crashes because of an exception being thrown inside a spl_register_autoload()'ed userland method. Here's the bt: #0 zend_lookup_class_ex (name=0x15b9d40 "Exception", name_length=9, use_autoload=1, ce=0x7fffffffb2e0) at /home/flav/php-5.3.0/Zend/zend_execute_API.c:1016 #1 0x00000000007954d1 in zend_fetch_class (class_name=0x15b9d40 "Exception", class_name_len=9, fetch_type=4) at /home/flav/php-5.3.0/Zend/zend_execute_API.c:1524 #2 0x00000000007d8d22 in ZEND_FETCH_CLASS_SPEC_CONST_HANDLER (execute_data=0x7ffff6552cc0) at /home/flav/php-5.3.0/Zend/zend_vm_execute.h:724 #3 0x00000000007d6b50 in execute (op_array=0x15bc828) at /home/flav/php-5.3.0/Zend/zend_vm_execute.h:104 #4 0x00000000007940e5 in zend_call_function (fci=0x7fffffffb640, fci_cache=0x7fffffffb5d0) at /home/flav/php-5.3.0/Zend/zend_execute_API.c:936 #5 0x00000000007bfae4 in zend_call_method (object_pp=0x0, obj_ce=0x15b8eb0, fn_proxy=0x15b09f8, function_name=0x15ba410 "\\yap\\base::autoload", function_name_len=20, retval_ptr_ptr=0x7fffffffb748, param_count=1, arg1=0x15f8930, arg2=0x0) at /home/flav/php-5.3.0/Zend/zend_interfaces.c:97 #6 0x0000000000600de0 in zif_spl_autoload_call (ht=1, return_value=0x161c620, return_value_ptr=0x7fffffffba70, this_ptr=0x0, return_value_used=1) at /home/flav/php-5.3.0/ext/spl/php_spl.c:395 #7 0x00000000007942c2 in zend_call_function (fci=0x7fffffffba20, fci_cache=0x7fffffffb9f0) at /home/flav/php-5.3.0/Zend/zend_execute_API.c:958 #8 0x0000000000794999 in zend_lookup_class_ex (name=0x15f8a30 "YAP\\patterns\\IInheritable", name_length=25, use_autoload=1, ce=0x7fffffffbb20) at /home/flav/php-5.3.0/Zend/zend_execute_API.c:1089 #9 0x00000000007954d1 in zend_fetch_class (class_name=0x15f8a30 "YAP\\patterns\\IInheritable", class_name_len=25, fetch_type=6) at /home/flav/php-5.3.0/Zend/zend_execute_API.c:1524 #10 0x00000000007d93d3 in ZEND_ADD_INTERFACE_SPEC_CONST_HANDLER (execute_data=0x7ffff6552bb8) at /home/flav/php-5.3.0/Zend/zend_vm_execute.h:890 #11 0x00000000007d6b50 in execute (op_array=0x15f68c8) at /home/flav/php-5.3.0/Zend/zend_vm_execute.h:104 #12 0x00000000007a38de in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/flav/php-5.3.0/Zend/zend.c:1188 #13 0x000000000072ed19 in php_execute_script (primary_file=0x7fffffffe1b0) at /home/flav/php-5.3.0/main/main.c:2196 #14 0x000000000088c885 in main (argc=7, argv=0x7fffffffe408) at /home/flav/php-5.3.0/sapi/cli/php_cli.c:1188