|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-07-21 14:27 UTC] tony2001@php.net
[2005-07-22 09:42 UTC] dmitry@php.net
[2005-07-22 09:44 UTC] derick@php.net
[2008-07-11 21:12 UTC] jani@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 06:00:01 2025 UTC |
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