From:             Enrico dot Simetti at ingegneria dot studenti dot unige dot it
Operating system: Linux/WinXP
PHP version:      5.0.0RC2
PHP Bug Type:     Reproducible crash
Bug description:  Apache Crash with segmentation fault (11) 

Description:
------------
OS:     Linux 2.6.0
Apache: Apache/1.3.29 (Unix)
PHP:    5.0.0RC2 (compiled with "--with-mysql --with-debug")

The following script makes my apache crash with this error:
"[notice] child pid 13748 exit signal Segmentation fault (11)"

OS:     Windows XP SP1
Apache: Apache/2.0.49 (and 1.3.31 too)
PHP:    5.0.0RC2

The same script makes my apache crash with this error:
"[notice] Parent: child process exited with status 3221225477 --
Restarting."

Reproduce code:
---------------
http://matfors.net/tupac/exception.php.txt

Expected result:
----------------
A few notes...
If i dont use my error_class, everything works fine, and PHP gives me this
warning
"Warning: call_user_func_array() [function.call-user-func-array]: Unable
to call my_class::throw_exception() in C:\Programmi\Apache
Group\Apache2\htdocs\testfield\exception.php on line 40"
problably since i threw an exception in that function.

If i use my error_class and i dont use the call_user_func_array, but
instead i call $test->throw_exception() everything works fine again
(because no Warning is generated?)

If i use my error class and call call_user_func_array then everything
blows up 

Actual result:
--------------
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 13800)]
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x403d2fb5 in execute (op_array=0xbfffcca0) at
/root/php-5.0.0RC2/Zend/zend_execute.c:1391
#2  0x403ac282 in zend_call_function (fci=0xbfffcca0, fci_cache=0x0)
    at /root/php-5.0.0RC2/Zend/zend_execute_API.c:835
#3  0x403abbb5 in call_user_function_ex (function_table=0x80c8f78,
object_pp=0x80c8f78,
    function_name=0x80c8f78, retval_ptr_ptr=0x80c8f78,
param_count=135040888, params=0x80c8f78,
    no_separation=135040888, symbol_table=0x80c8f78)
    at /root/php-5.0.0RC2/Zend/zend_execute_API.c:550
#4  0x403b5f63 in zend_error (type=2, format=0x403fbb8e "%s") at
/root/php-5.0.0RC2/Zend/zend.c:975
#5  0x4037f6a8 in php_verror (docref=0x80c3f4c "", params=0x403e0774 "",
type=2,
    format=0x403ecdcf "Unable to call %s()", args=0xbfffce0c
"\214>[EMAIL PROTECTED]")
    at /root/php-5.0.0RC2/main/main.c:544
#6  0x4037f9df in php_error_docref0 (docref=0x0, type=2, format=0x403ecdcf
"Unable to call %s()")
    at /root/php-5.0.0RC2/main/main.c:564
#7  0x40327d55 in zif_call_user_func_array (ht=2, return_value=0x80c3e6c,
this_ptr=0x0,
    return_value_used=0) at
/root/php-5.0.0RC2/ext/standard/basic_functions.c:1949
#8  0x403d6660 in zend_do_fcall_common_helper (execute_data=0xbfffd090,
opline=0x80c3ac0,
    op_array=0x80c30e4) at /root/php-5.0.0RC2/Zend/zend_execute.c:2699
#9  0x403d67da in zend_do_fcall_handler (execute_data=0xbfffd090,
opline=0x80c3ac0,
    op_array=0x80c30e4) at /root/php-5.0.0RC2/Zend/zend_execute.c:2828
#10 0x403d2fb5 in execute (op_array=0x80c30e4) at
/root/php-5.0.0RC2/Zend/zend_execute.c:1391
#11 0x403b629d in zend_execute_scripts (type=8, retval=0x0, file_count=3)
    at /root/php-5.0.0RC2/Zend/zend.c:1058
#12 0x403817c8 in php_execute_script (primary_file=0xbffff3f0) at
/root/php-5.0.0RC2/main/main.c:1630
#13 0x403dd1ae in apache_php_module_main (r=0x8178af4,
display_source_mode=0)
    at /root/php-5.0.0RC2/sapi/apache/sapi_apache.c:54
#14 0x403ddcda in send_php (r=0x8178af4, display_source_mode=0,
filename=0x0)
    at /root/php-5.0.0RC2/sapi/apache/mod_php5.c:621
#15 0x403dde83 in send_parsed_php (r=0x8178af4) at
/root/php-5.0.0RC2/sapi/apache/mod_php5.c:636
#16 0x080548df in ap_invoke_handler ()
#17 0x080698a7 in ap_some_auth_required ()
#18 0x08069906 in ap_process_request ()
#19 0x0806093d in ap_child_terminate ()
#20 0x08060b0b in ap_child_terminate ()
#21 0x08060c71 in ap_child_terminate ()
#22 0x08061317 in ap_child_terminate ()
#23 0x08061b4f in main ()
#24 0x400bed06 in __libc_start_main () from /lib/libc.so.6

(gdb) frame 1
#1  0x403d2fb5 in execute (op_array=0xbfffcca0) at
/root/php-5.0.0RC2/Zend/zend_execute.c:1391
1391                    if (EX(opline)->handler(&execute_data, EX(opline),
op_array TSRMLS_CC)) {
(gdb) print (char
*)(executor_globals.function_state_ptr->function)->common.function_name
$2 = 0x80c80f4 "handler"

-- 
Edit bug report at http://bugs.php.net/?id=28422&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28422&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28422&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28422&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28422&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28422&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28422&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28422&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28422&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28422&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28422&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28422&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28422&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28422&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28422&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28422&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28422&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28422&r=float

Reply via email to