ID: 33802
User updated by: isitoya at wakhok dot ac dot jp
Reported By: isitoya at wakhok dot ac dot jp
-Status: Feedback
+Status: Open
Bug Type: Reproducible crash
Operating System: Suse9.2
PHP Version: 5.1.0b3
New Comment:
Thank you for reply.
I tried latest snapshot php5-200507211030.
but same error occured.
upper one produces the SIGSEGV. this one
set_error_handler('errorHandler', E_USER_ERROR);
try{
test();
}catch(Exception $e){
}
restore_error_handler();
Is this caused by my glibc version?
rpm -qa | grep glibc
glibc-32bit-9.2-200412151444
glibc-devel-32bit-9.2-200412202043
glibc-2.3.3-118
glibc-locale-2.3.3-118
glibc-locale-32bit-9.2-200412202043
glibc-devel-2.3.3-118
glibc-i18ndata-2.3.3-118
Previous Comments:
------------------------------------------------------------------------
[2005-07-21 13:25:13] [EMAIL PROTECTED]
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
So which of the two examples produces the SIGSEGV ?
Also, please try latest snapshot, as I can't reproduce it with both
pieces of code you've provided.
------------------------------------------------------------------------
[2005-07-21 13:14:45] isitoya at wakhok dot ac dot jp
Description:
------------
When I using Phing, My testcase with PEAR-SOAP and rdfapi-php had
stopped with segmentation fault.
And I Found that throwing exception in error_handler causes Seg fault.
Reproduce code:
---------------
<?php
set_error_handler('errorHandler', E_USER_ERROR);
try{
test();
}catch(Exception $e){
}
restore_error_handler();
function test(){
trigger_error("error", E_USER_ERROR);
}
function errorHandler($errno, $errstr, $errfile, $errline) {
throw new Exception();
}
?>
-----
no try and catch
<?php
set_error_handler('errorHandler', E_USER_ERROR);
test();
restore_error_handler();
function test(){
trigger_error("error", E_USER_ERROR);
}
function errorHandler($errno, $errstr, $errfile, $errline) {
throw new Exception();
}
?>
Expected result:
----------------
nothing
Actual result:
--------------
*** glibc detected *** double free or corruption: 0x0000000000af7970
***
*** glibc detected *** double free or corruption: 0x0000000000af7a10
***
*** glibc detected *** double free or corruption: 0x0000000000af07b0
***
------
no try and catch
Fatal error: Uncaught exception 'Exception' in
/usr/home/kent/tests/trigger_errorTest.php:11
Stack trace:
#0 [internal function]: errorHandler(256, 'error',
'/usr/home/kent/...', 7, Array)
#1 /usr/home/kent/tests/trigger_errorTest.php(7):
trigger_error('error', 256)
#2 /usr/home/kent/tests/trigger_errorTest.php(3): test()
#3 {main}
thrown in /usr/home/kent/tests/trigger_errorTest.php on line 11
*** glibc detected *** double free or corruption: 0x0000000000af7870
***
*** glibc detected *** double free or corruption: 0x0000000000af7910
***
Segmentation fault
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33802&edit=1