|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-02-03 11:26 UTC] bugs at xmlnode dot com
Description:
------------
if apd is enabled and set_exception_handler used (either against an object method or an inline function) a segmentation fault occurs. If apd is commented out of php.ini it works as expected. I believe the bug is similar to 4907, but different enough to warrant a separate bug. If nothing else, mine contains a backtrace. :(
I've tried php 5.1.1, 5.1.2 and the latest dev build
Reproduce code:
---------------
<?php
function lastResort($e){
echo mktime();
}
set_exception_handler('lastResort');
throw new Exception('doh');
?>
Expected result:
----------------
a unix timestamp
Actual result:
--------------
#0 0x0828e640 in zend_get_executed_lineno () at /usr/src/downloads/php-5.1.2/Zend/zend_execute_API.c:367
#1 0x4083003c in apd_execute (op_array=0x8692170) at /usr/src/downloads/apd-1.0.1/php_apd.c:515
#2 0x0828f449 in zend_call_function (fci=0xbfffd650, fci_cache=0x0) at /usr/src/downloads/php-5.1.2/Zend/zend_execute_API.c:907
#3 0x0828ecbe in call_user_function_ex (function_table=0x0, object_pp=0x0, function_name=0x0, retval_ptr_ptr=0x0, param_count=0, params=0x0, no_separation=0, symbol_table=0x0)
at /usr/src/downloads/php-5.1.2/Zend/zend_execute_API.c:571
#4 0x082991c8 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/src/downloads/php-5.1.2/Zend/zend.c:1118
#5 0x0825fefd in php_execute_script (primary_file=0xbffffa80) at /usr/src/downloads/php-5.1.2/main/main.c:1720
#6 0x082fd5af in main (argc=2, argv=0xbffffb24) at /usr/src/downloads/php-5.1.2/sapi/cli/php_cli.c:1077
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 22:00:01 2025 UTC |
I have the same experience with PHP 5.2.5 and APD 1.0.1. Whenever I have my own exception handler, PHP crashes with segmentation fault when an exception is thrown. function test_exception_handler($exc) { echo $exc; } set_exception_handler('test_exception_handler'); throw new Exception('test');