From:             spam01 at pornel dot net
Operating system: any? OS X tested
PHP version:      6CVS-2006-04-30 (snap)
PHP Bug Type:     Reproducible crash
Bug description:  deadlock when custom error handler is to catch array type 
hint error

Description:
------------
If I have custom error handler set and cause error by not giving arguments
to function that expects array, PHP deadlocks (endless loop).

Without custom error handler same code outputs
"Catchable fatal error: Argument 1 passed to ... must be an array, called
in ..."


Reproduce code:
---------------
<?php

function error_handler($errno, $errstr, $errfile, $errline, $context)
{
        echo 'OK';
}

set_error_handler('error_handler');


class Foo
{       
        function foo(array $foo)
        {
        }
}

$foo = new Foo();
$foo->foo();

Expected result:
----------------
'OK'

Actual result:
--------------
No output. 100% CPU usage.

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

Reply via email to