|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-01-19 10:13 UTC] burnwave at gmail dot com
[2009-02-28 18:47 UTC] shire@php.net
[2009-04-05 23:28 UTC] shire@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 13 09:00:01 2025 UTC |
Description: ------------ APC makes PHP segfault at every execution that require the opcode cache. - First page printed is OK (when opcode must be generated). - Same page refreshed is making a segfault. I also tested with APC from CVS, but same problem. Reproduce code: --------------- This bug can be reproduced by pressing F5 several times: First print = OK, second = segfault. Third = OK, fourth = segfault. Etc. <?php error_reporting(E_ALL); ini_set('display_startup_errors', 1); ini_set('display_errors', 1); define('CWD', realpath(dirname(__FILE__).'/../').'/'); set_include_path ( '/usr/share/pear' . PATH_SEPARATOR . 'library' . PATH_SEPARATOR . CWD.'application/models'); //get_include_path() require_once "Zend/Loader.php"; //Yes, this is Zend Framework Zend_Loader::registerAutoload(); Zend_Loader::loadFile("Smarty/Smarty.class.php"); echo "Hello World"; ?> Additional informations: - bug only happened when set_include_path has at least 3 paths whith CWD as prefix. - bug only happened when ini_set functions are present. I wasn't able to reproduce the bug by removing anything else. There is no segfault when "extension=apc.so" is removed in php.ini Expected result: ---------------- "Hello World" Actual result: -------------- Program received signal SIGSEGV, Segmentation fault. zend_hash_destroy (ht=0xb7cacb08) at /usr/src/php5.3-snap/Zend/zend_hash.c:524 524 p = p->pListNext; #0 zend_hash_destroy (ht=0xb7cacb08) at /usr/src/php5.3-snap/Zend/zend_hash.c:524 #1 0x082519a1 in _zval_dtor_func (zvalue=0xb7cad320) at /usr/src/php5.3-snap/Zend/zend_variables.c:43 #2 0x08244a5a in _zval_ptr_dtor (zval_ptr=0xb7cad310) at /usr/src/php5.3-snap/Zend/zend_variables.h:35 #3 0x0825e313 in zend_hash_clean (ht=0xb7cac43c) at /usr/src/php5.3-snap/Zend/zend_hash.c:552 #4 0xb7a96a31 in apc_free_class_entry_after_execution (src=0xb7cac3f8) at /usr/src/APC-3.0.19/apc_compile.c:2320 #5 0xb7a99ff2 in apc_request_shutdown () at /usr/src/APC-3.0.19/apc_main.c:642 #6 0xb7a92862 in zm_deactivate_apc (type=1, module_number=25) at /usr/src/APC-3.0.19/php_apc.c:312 #7 0x08253bf0 in module_registry_cleanup (module=0x1d) at /usr/src/php5.3-snap/Zend/zend_API.c:2125 #8 0x0825df8d in zend_hash_apply (ht=0x85638e0, apply_func=0x8253bd0 <module_registry_cleanup>) at /usr/src/php5.3-snap/Zend/zend_hash.c:673 #9 0x08251f5f in zend_deactivate_modules () at /usr/src/php5.3-snap/Zend/zend.c:875 #10 0x081fa065 in php_request_shutdown (dummy=0x0) at /usr/src/php5.3-snap/main/main.c:1496 #11 0x082e9710 in main (argc=1, argv=0xbffed6c4) at /usr/src/php5.3-snap/sapi/cgi/cgi_main.c:2056 Full Backtrace : ---------------- #0 zend_hash_destroy (ht=0xb7cacb08) at /usr/src/php5.3-snap/Zend/zend_hash.c:524 p = (Bucket *) 0x3 #1 0x082519a1 in _zval_dtor_func (zvalue=0xb7cad320) at /usr/src/php5.3-snap/Zend/zend_variables.c:43 No locals. #2 0x08244a5a in _zval_ptr_dtor (zval_ptr=0xb7cad310) at /usr/src/php5.3-snap/Zend/zend_variables.h:35 No locals. #3 0x0825e313 in zend_hash_clean (ht=0xb7cac43c) at /usr/src/php5.3-snap/Zend/zend_hash.c:552 p = (Bucket *) 0xb7cad394