|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-11-16 12:20 UTC] php dot bug at stre dot it
Description:
------------
this code below bring my server to crash
Reproduce code:
---------------
<?PHP
class Bad {
public static function badfunc() {
throw new Exception('Some Exception from bad class');
return 'hello';
}
public static function badcall($obj1, $key1, $val1) {
return 'hello';
}
}
try {
function test() {
Bad::badcall('test','bad',Bad::badfunc());
echo 'server ok';
}
test();
}
catch(Exception $err) {
echo $err->getMessage();
}
?>
Expected result:
----------------
no response from server, must restart service
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 18:00:01 2025 UTC |
sorry short version work, because there is first a standalone badfunc call, this version dont work <?PHP function badfunc() { throw new Exception('Some Exception from bad clas'); } function badcall($aaa, $bbb, $ccc) {} function test() { badcall(1,1,badfunc()); echo 'server ok'; } test(); ?> i think is a failure by building stack trace#0 0x08318170 in _zval_ptr_dtor (zval_ptr=0x40e33bf8, __zend_filename=0x856f580 "/usr/src/web/php/php5/Zend/zend_execute.h", __zend_lineno=122) at /usr/src/web/php/php5/Zend/zend_execute_API.c:352 #1 0x0834e4cb in zend_ptr_stack_clear_multiple () at zend_execute.h:122 #2 0x08349a4e in zend_do_fcall_common_helper (execute_data=0xbfffd7b0, op_array=0x40e428b4) at /usr/src/web/php/php5/Zend/zend_execute.c:2644 #3 0x08349c57 in zend_do_fcall_handler (execute_data=0xbfffd7b0, op_array=0x40e428b4) at /usr/src/web/php/php5/Zend/zend_execute.c:2696 #4 0x0834571f in execute (op_array=0x40e428b4) at /usr/src/web/php/php5/Zend/zend_execute.c:1271 #5 0x08324148 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/src/web/php/php5/Zend/zend.c:1016 #6 0x082e303a in php_execute_script (primary_file=0xbffffbb0) at /usr/src/web/php/php5/main/main.c:1622 #7 0x0835d87b in main (argc=2, argv=0xbffffc44) at /usr/src/web/php/php5/sapi/cli/php_cli.c:910