bcompiler - crash on unhandled exception
| From: | Marcin Gibula | Date: | Sat, 02 Apr 2005 12:44:59 +0000 |
| Subject: | bcompiler - crash on unhandled exception | ||
| Groups: | php.pecl.dev | ||
| Request: | Send a blank email to pecl-dev+get-2239@lists.php.net to get a copy of this message | ||
Hi,
I've just found a crash. Backtrace:
#0 zend_hash_apply_with_arguments (ht=0x0, destruct=0x55ded0
<_build_trace_string>, num_args=3)
at /home/sh/php-5.0.3/Zend/zend_hash.c:701
701 HASH_PROTECT_RECURSION(ht);
(gdb) bt
#0 zend_hash_apply_with_arguments (ht=0x0, destruct=0x55ded0
<_build_trace_string>, num_args=3)
at /home/sh/php-5.0.3/Zend/zend_hash.c:701
#1 0x000000000055e335 in zif_exception_getTraceAsString (ht=0,
return_value=0x822ca8, this_ptr=0x805048,
return_value_used=5594776)
at /home/sh/php-5.0.3/Zend/zend_exceptions.c:340
#2 0x00000000005426a7 in zend_call_function (fci=0x7fbfffcb00,
fci_cache=0x71d760)
at /home/sh/php-5.0.3/Zend/zend_execute_API.c:854
#3 0x000000000055e587 in zif_exception___toString (ht=0,
return_value=0x81eb38, this_ptr=0x805048,
return_value_used=5594776)
at /home/sh/php-5.0.3/Zend/zend_exceptions.c:391
#4 0x00000000005426a7 in zend_call_function (fci=0x7fbfffcd80,
fci_cache=0x71d760)
at /home/sh/php-5.0.3/Zend/zend_execute_API.c:854
#5 0x000000000055c870 in zend_call_method (object_pp=0x7fbfffce30,
obj_ce=0x81efc8, fn_proxy=0x0,
function_name=0x59e1e2 "__tostring", function_name_len=10,
retval_ptr_ptr=0x7fbfffce38,
param_count=-1073755905, arg1=0x0, arg2=0x0)
at /home/sh/php-5.0.3/Zend/zend_interfaces.c:79
#6 0x000000000055ec11 in zend_exception_error (exception=0x805048)
at /home/sh/php-5.0.3/Zend/zend_exceptions.c:532
#7 0x000000000054e239 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /home/sh/php-5.0.3/Zend/zend.c:1100
#8 0x000000000051408c in php_execute_script (primary_file=0x7fbffff4e0)
at /home/sh/php-5.0.3/main/main.c:1628
#9 0x000000000058d2a1 in main (argc=2, argv=0x7fbffff628)
at /home/sh/php-5.0.3/sapi/cli/php_cli.c:943
Test case:
File: index.php
<?php
error_reporting(E_STRICT | E_ALL);
class InvalidParamException extends Exception {
}
class Config {
private static $ini;
public static function test()
{
throw new InvalidParamException();
}
}
Config::test();
?>
File: comp.php
<?php
$fp = fopen('test.phb', 'w');
bcompiler_write_header($fp);
bcompiler_write_file($fp, 'index.php');
bcompiler_write_footer($fp);
fclose($fp);
include('test.phb');
?>
--
mg