|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2011-08-26 22:04 UTC] sjaillet at gmail dot com
Description:
------------
Apache crashes with loading bcompiled class.
php -f works well and load the class as expected
In the php.ini the only loaded module is:
extension=bcompiler.so
Reproduce code:
---------------
lib.phb (the compiled class)
<?php
class Test {
static function hello(){
echo "Class test using bcompiler";
}
}
?>
test.php (a normal php file)
<?php
require('lib.phb');
Test::hello();
?>
http://localhost/test.php (Bug: empty page)
php -f test.php (works fine)
Expected result:
----------------
http://localhost/test.php should display : "Class test using bcompiler"
Actual result:
--------------
Bug: empty page
Patchessuhosin-class-destructor-fix (last revision 2012-06-25 14:08 UTC by icukeng at gmail dot com)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 19:00:01 2025 UTC |
P.S.: using for lib.phb: <?php function hello(){ echo "Function test using bcompiler"; } ?> and for test.php : <?php require('lib.phb'); hello(); ?> works fine with apache and no segmentation fault occur.Hi! Same behavior using the last trunk. Here the backtrace : Program terminated with signal 11, Segmentation fault. #0 0x012b5d07 in _zend_hash_add_or_update (ht=0x4e2dbc5f, arKey=0x22f9c1f0 "REMOTE_ADDR", nKeyLength=<error type>, pData=0xbfd88fc8, nDataSize=<error type>, pDest=0xbfd88fc4, flag=1) at /build/buildd/php5-5.3.2/Zend/zend_hash.c:413 413 /build/buildd/php5-5.3.2/Zend/zend_hash.c: Aucun fichier ou dossier de ce type. in /build/buildd/php5-5.3.2/Zend/zend_hash.c (gdb) bt #0 0x012b5d07 in _zend_hash_add_or_update (ht=0x4e2dbc5f, arKey=0x22f9c1f0 "REMOTE_ADDR", nKeyLength=<error type>, pData=0xbfd88fc8, nDataSize=<error type>, pDest=0xbfd88fc4, flag=1) at /build/buildd/php5-5.3.2/Zend/zend_hash.c:413 #1 0x0125d18c in php_register_variable_ex (var_name=0x22f9c608 "REMOTE_ADDR", val=0xbfd8904c, track_vars_array=0x22f9ad48) at /build/buildd/php5-5.3.2/Zend/zend_hash.h:348 #2 0x0108e54d in php_sapi_filter (arg=4, var=0x1687c0a "REMOTE_ADDR", val=0xbfd890ac, val_len=<error type>, new_val_len=0x0) at /build/buildd/php5-5.3.2/ext/filter/filter.c:482 #3 0x01256964 in sapi_getenv (name=0x1687c0a "REMOTE_ADDR", name_len=<error type>) at /build/buildd/php5-5.3.2/main/SAPI.c:944 #4 0x012634c7 in php_security_log (loglevel=1, fmt=0x16b4604 "possible memory corruption detected - unknown Hashtable destructor") at /build/buildd/php5-5.3.2/main/suhosin_patch.c:229 #5 0x012b39b5 in zend_hash_check_destructor (pDestructor=0) at /build/buildd/php5-5.3.2/Zend/zend_hash.c:316 #6 0x012b3e02 in zend_hash_destroy (ht=0x22fa0324) at /build/buildd/php5-5.3.2/Zend/zend_hash.c:721 #7 0x0129f03d in destroy_zend_class (pce=0x2301c564) at /build/buildd/php5-5.3.2/Zend/zend_opcode.c:185 #8 0x012b3aaa in zend_hash_apply_deleter (ht=0x22fa02b8, p=0x2301c558) at /build/buildd/php5-5.3.2/Zend/zend_hash.c:813 #9 0x012b3bcc in zend_hash_reverse_apply (ht=0x22e1b418, apply_func=0x1299a30 <clean_non_persistent_class>) at /build/buildd/php5-5.3.2/Zend/zend_hash.c:962 #10 0x0129a928 in shutdown_executor () at /build/buildd/php5-5.3.2/Zend/zend_execute_API.c:310 #11 0x012a784f in zend_deactivate () at /build/buildd/php5-5.3.2/Zend/zend.c:962 #12 0x0124c0d8 in php_request_shutdown (dummy=0x0) at /build/buildd/php5-5.3.2/main/main.c:1649 #13 0x0133946c in php_handler (r=0x22fd5ef8) at /build/buildd/php5-5.3.2/sapi/apache2handler/sapi_apache2.c:512 #14 0x00f89031 in ap_run_handler (r=0x22fd5ef8) at /build/buildd/apache2-2.2.14/server/config.c:159 #15 0x00f8ce17 in ap_invoke_handler (r=0x22fd5ef8) at /build/buildd/apache2-2.2.14/server/config.c:373 #16 0x00f9c728 in ap_process_request (r=0x22fd5ef8) at /build/buildd/apache2-2.2.14/modules/http/http_request.c:282 #17 0x00f99258 in ap_process_http_connection (c=0x22fcfeb8) at /build/buildd/apache2-2.2.14/modules/http/http_core.c:190 #18 0x00f918a1 in ap_run_process_connection (c=0x22fcfeb8) at /build/buildd/apache2-2.2.14/server/connection.c:43 #19 0x00fa1bea in child_main (child_num_arg=<value optimized out>) at /build/buildd/apache2-2.2.14/server/mpm/prefork/prefork.c:662 #20 0x00fa1f6e in make_child (s=<value optimized out>, slot=2) at /build/buildd/apache2-2.2.14/server/mpm/prefork/prefork.c:758 #21 0x00fa2342 in startup_children (_pconf=0x22c880a8, plog=0x22cba170, s=0x22c8c8e8) at /build/buildd/apache2-2.2.14/server/mpm/prefork/prefork.c:776 #22 ap_mpm_run (_pconf=0x22c880a8, plog=0x22cba170, s=0x22c8c8e8) at /build/buildd/apache2-2.2.14/server/mpm/prefork/prefork.c:997 #23 0x00f73a92 in main (argc=3, argv=0xbfd8dca4) at /build/buildd/apache2-2.2.14/server/main.c:742Sorry, i did a mistake during the previous copy paste.. #0 0x012b5d07 in _zend_hash_add_or_update (ht=0x4e2dbc5f, arKey=0x22f9c1f0 "REMOTE_ADDR", nKeyLength=<error type>, pData=0xbfd88fc8, nDataSize=<error type>, pDest=0xbfd88fc4, flag=1) at /build/buildd/php5-5.3.2/Zend/zend_hash.c:413 #1 0x0125d18c in php_register_variable_ex (var_name=0x22f9c608 "REMOTE_ADDR", val=0xbfd8904c, track_vars_array=0x22f9ad48) at /build/buildd/php5-5.3.2/Zend/zend_hash.h:348 #2 0x0108e54d in php_sapi_filter (arg=4, var=0x1687c0a "REMOTE_ADDR", val=0xbfd890ac, val_len=<error type>, new_val_len=0x0) at /build/buildd/php5-5.3.2/ext/filter/filter.c:482 #3 0x01256964 in sapi_getenv (name=0x1687c0a "REMOTE_ADDR", name_len=<error type>) at /build/buildd/php5-5.3.2/main/SAPI.c:944 #4 0x012634c7 in php_security_log (loglevel=1, fmt=0x16b4604 "possible memory corruption detected - unknown Hashtable destructor") at /build/buildd/php5-5.3.2/main/suhosin_patch.c:229 #5 0x012b39b5 in zend_hash_check_destructor (pDestructor=0) at /build/buildd/php5-5.3.2/Zend/zend_hash.c:316 #6 0x012b3e02 in zend_hash_destroy (ht=0x22fa0324) at /build/buildd/php5-5.3.2/Zend/zend_hash.c:721 #7 0x0129f03d in destroy_zend_class (pce=0x2301c564) at /build/buildd/php5-5.3.2/Zend/zend_opcode.c:185 #8 0x012b3aaa in zend_hash_apply_deleter (ht=0x22fa02b8, p=0x2301c558) at /build/buildd/php5-5.3.2/Zend/zend_hash.c:813 #9 0x012b3bcc in zend_hash_reverse_apply (ht=0x22e1b418, apply_func=0x1299a30 <clean_non_persistent_class>) at /build/buildd/php5-5.3.2/Zend/zend_hash.c:962 #10 0x0129a928 in shutdown_executor () at /build/buildd/php5-5.3.2/Zend/zend_execute_API.c:310 #11 0x012a784f in zend_deactivate () at /build/buildd/php5-5.3.2/Zend/zend.c:962 #12 0x0124c0d8 in php_request_shutdown (dummy=0x0) at /build/buildd/php5-5.3.2/main/main.c:1649 #13 0x0133946c in php_handler (r=0x22fd5ef8) at /build/buildd/php5-5.3.2/sapi/apache2handler/sapi_apache2.c:512 #14 0x00f89031 in ap_run_handler (r=0x22fd5ef8) at /build/buildd/apache2-2.2.14/server/config.c:159 #15 0x00f8ce17 in ap_invoke_handler (r=0x22fd5ef8) at /build/buildd/apache2-2.2.14/server/config.c:373 #16 0x00f9c728 in ap_process_request (r=0x22fd5ef8) at /build/buildd/apache2-2.2.14/modules/http/http_request.c:282 #17 0x00f99258 in ap_process_http_connection (c=0x22fcfeb8) at /build/buildd/apache2-2.2.14/modules/http/http_core.c:190 #18 0x00f918a1 in ap_run_process_connection (c=0x22fcfeb8) at /build/buildd/apache2-2.2.14/server/connection.c:43 #19 0x00fa1bea in child_main (child_num_arg=<value optimized out>) at /build/buildd/apache2-2.2.14/server/mpm/prefork/prefork.c:662 #20 0x00fa1f6e in make_child (s=<value optimized out>, slot=2) at /build/buildd/apache2-2.2.14/server/mpm/prefork/prefork.c:758 #21 0x00fa2342 in startup_children (_pconf=0x22c880a8, plog=0x22cba170, s=0x22c8c8e8) at /build/buildd/apache2-2.2.14/server/mpm/prefork/prefork.c:776 #22 ap_mpm_run (_pconf=0x22c880a8, plog=0x22cba170, s=0x22c8c8e8) at /build/buildd/apache2-2.2.14/server/mpm/prefork/prefork.c:997 #23 0x00f73a92 in main (argc=3, argv=0xbfd8dca4) at /build/buildd/apache2-2.2.14/server/main.c:742