#23162 [Opn]: user_error() crashs if $error_msg > 1024 bytes
| From: | jay@php.net | Date: | Mon, 14 Apr 2003 20:27:20 +0000 |
| Subject: | #23162 [Opn]: user_error() crashs if $error_msg > 1024 bytes | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-37661@lists.php.net to get a copy of this message | ||
ID: 23162
Updated by: jay@php.net
Reported By: dimon at postmark dot net
Status: Open
Bug Type: Reproducible crash
Operating System: Windows 2000 Server
PHP Version: 4.3.1
New Comment:
I have no idea if this hurts anything (hasn't given me any
trouble), but adding "z_context->is_ref = 1;" to zend.c
before calling call_user_function_ex() in zend_error()
seems to fix the "$context passed by reference" segfault.
Not being much of a ZE engine hacker, I don't know if that
makes things better or worse.
J
Previous Comments:
------------------------------------------------------------------------
[2003-04-14 03:47:06] dimon at postmark dot net
In Version 4.3.2-RC Apr 14 2003 02:12:05
bug still exists.
------------------------------------------------------------------------
[2003-04-11 19:35:36] magnus@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2003-04-11 04:17:18] dimon at postmark dot net
function qq(&$type, &$details, &$file, &$line, $context){
echo "$details";
}
set_error_handler('qq');
user_error(str_repeat('q', 1025), E_USER_WARNING);
// will cause endless loop
set_error_handler(create_function('$type, &$details, $file, $line,
$context', 'echo "$details";'));
user_error(str_repeat('q', 1025), E_USER_WARNING);
// will cause crash
// btw $context passed by reference will cause crash also
set_error_handler(create_function('$type, &$details, $file, $line,
&$context', 'echo "$details";'));
user_error(str_repeat('q', 1024), E_USER_WARNING);
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23162&edit=1