From:             ron at nexweb dot ca
Operating system: Linux 2.4.28
PHP version:      5.0.4
PHP Bug Type:     Unknown/Other Function
Bug description:  Segmentation fault on recursive set_error_handler calls

Description:
------------
PHP gives a Segmentation fault on execution of the code below...
The logic error is obvious but in application this may happen...

Reproduce code:
---------------
#!/usr/local/bin/php -c/usr/local/php/lib/php.ini
<?php
function err_handler($errno, $errstr, $errfile, $errline)
{
        createAnotherError();
}
function createAnotherError()
{
        set_error_handler("err_handler");
        trigger_error("error 2");
}
        set_error_handler("err_handler");
        trigger_error("error 1");       
?>


Expected result:
----------------
An error message maybe that tells recursivity or tells error happen in
error handler...

Actual result:
--------------
Segmentation fault

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

Reply via email to