Hi, after a cvs update i get a segfault with this script:
<?php
class test
{
function __destruct() {
$this->foo = false;
}
public function start() {
throw new Exception();
}
}
$test = new test();
$test->start();
?>
Backtrace:
#0 0x00000000 in ?? ()
#1 0x081656a2 in execute (op_array=0x40206284) at /home/et/cvs.php.net/php-src/Zend/zend_execute.c:1339
#2 0x0814790e in zend_call_function (fci=0xbfffd400, fci_cache=0xbfffd3e0)
at /home/et/cvs.php.net/php-src/Zend/zend_execute_API.c:759
#3 0x0815924c in zend_call_method (object_pp=0xbfffd48c, obj_ce=0x40204c84, fn_proxy=0x0,
function_name=0x819f540 "__destruct", function_name_len=10, retval_ptr_ptr=0x0, param_count=1075859404, arg1=0x0,
arg2=0x0) at /home/et/cvs.php.net/php-src/Zend/zend_interfaces.c:79
#4 0x0815af9a in zend_objects_destroy_object (object=0x402051ac, handle=1075859404)
at /home/et/cvs.php.net/php-src/Zend/zend_objects.c:71
#5 0x0815c8c0 in zend_objects_store_call_destructors (objects=0x81c06d0)
at /home/et/cvs.php.net/php-src/Zend/zend_objects_API.c:52
#6 0x08146e92 in shutdown_executor () at /home/et/cvs.php.net/php-src/Zend/zend_execute_API.c:209
#7 0x0814e54b in zend_deactivate () at /home/et/cvs.php.net/php-src/Zend/zend.c:802
#8 0x08124091 in php_request_shutdown (dummy=0x0) at /home/et/cvs.php.net/php-src/main/main.c:1243
#9 0x0816ded8 in main (argc=4, argv=0xbfffe1e4) at /home/et/cvs.php.net/php-src/sapi/cli/php_cli.c:1044
#10 0x420158f7 in __libc_start_main () from /lib/i686/libc.so.6
--
Regards,
Stefan Walk
<swalk@prp.physik.tu-darmstadt.de
Hi, after a cvs update i get a segfault with this script:
[...]
This sourcecode (which is the same except that there is no code in the
destructor) prints out:
Fatal error: Exception thrown without a stack frame in Unknown on line 0
-- snip --
<?php
class test {
function __destruct() {
}
public function start() {
throw new Exception();
}
}
$test = new test();
$test->start();
?>
-- snip --
From zend_exceptions.c:
if (!EG(current_execute_data)) {
zend_error(E_ERROR, "Exception thrown without a stack frame");
}
This might help tracking down the problem.
/ Timm
This should be fixed now. Thanks for the short reproducing script.
Andi
At 11:41 PM 2/26/2004 +0100, Stefan Walk wrote:
Hi, after a cvs update i get a segfault with this script:
<?php
class test
{
function __destruct() {
$this->foo = false;
}
public function start() {
throw new Exception();
}
}$test = new test();
$test->start();?>
Backtrace:
#0 0x00000000 in ?? ()
#1 0x081656a2 in execute (op_array=0x40206284) at
/home/et/cvs.php.net/php-src/Zend/zend_execute.c:1339
#2 0x0814790e in zend_call_function (fci=0xbfffd400, fci_cache=0xbfffd3e0)
at /home/et/cvs.php.net/php-src/Zend/zend_execute_API.c:759
#3 0x0815924c in zend_call_method (object_pp=0xbfffd48c,
obj_ce=0x40204c84, fn_proxy=0x0,
function_name=0x819f540 "__destruct", function_name_len=10,
retval_ptr_ptr=0x0, param_count=1075859404, arg1=0x0,
arg2=0x0) at /home/et/cvs.php.net/php-src/Zend/zend_interfaces.c:79
#4 0x0815af9a in zend_objects_destroy_object (object=0x402051ac,
handle=1075859404)
at /home/et/cvs.php.net/php-src/Zend/zend_objects.c:71
#5 0x0815c8c0 in zend_objects_store_call_destructors (objects=0x81c06d0)
at /home/et/cvs.php.net/php-src/Zend/zend_objects_API.c:52
#6 0x08146e92 in shutdown_executor () at
/home/et/cvs.php.net/php-src/Zend/zend_execute_API.c:209
#7 0x0814e54b in zend_deactivate () at
/home/et/cvs.php.net/php-src/Zend/zend.c:802
#8 0x08124091 in php_request_shutdown (dummy=0x0) at
/home/et/cvs.php.net/php-src/main/main.c:1243
#9 0x0816ded8 in main (argc=4, argv=0xbfffe1e4) at
/home/et/cvs.php.net/php-src/sapi/cli/php_cli.c:1044
#10 0x420158f7 in __libc_start_main () from /lib/i686/libc.so.6--
Regards,
Stefan Walk
<swalk@prp.physik.tu-darmstadt.de