Hi, I was trying out the class type hints feature, and
<?
class P { }
function func(P $p) { }
$p = new P;
func(&$p);
?>
that causes a segfault. Doing function func(P &$p), also causes a
segfault. I'm using todays snapshot. Here's a bt.
Program received signal SIGSEGV, Segmentation fault.
0x0814d26f in zend_assign_to_variable_reference (result=0x401d9c00,
variable_ptr_ptr=0x401d87d8, value_ptr_ptr=0x401cf95c,
Ts=0x0) at /usr/src/php5-200307231530/Zend/zend_execute.c:238
238 T(result->u.var).var.ptr_ptr = variable_ptr_ptr;
(gdb) bt
#0 0x0814d26f in zend_assign_to_variable_reference (result=0x401d9c00,
variable_ptr_ptr=0x401d87d8, value_ptr_ptr=0x401cf95c,
Ts=0x0) at /usr/src/php5-200307231530/Zend/zend_execute.c:238
#1 0x081522a7 in zend_recv_handler (execute_data=0xbfffce10,
op_array=0x81fe978)
at /usr/src/php5-200307231530/Zend/zend_execute.c:110
#2 0x0814e793 in execute (op_array=0x81fe978) at
/usr/src/php5-200307231530/Zend/zend_execute.c:1192
#3 0x0815156e in zend_do_fcall_common_helper (execute_data=0xbfffcfd0,
op_array=0x401d8134)
at /usr/src/php5-200307231530/Zend/zend_execute.c:2541
#4 0x0814e793 in execute (op_array=0x401d8134) at
/usr/src/php5-200307231530/Zend/zend_execute.c:1192
#5 0x0813af9b in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /usr/src/php5-200307231530/Zend/zend.c:1017
#6 0x08113b1f in php_execute_script (primary_file=0xbffff380) at
/usr/src/php5-200307231530/main/main.c:1568
#7 0x08156fbb in main (argc=2, argv=0xbffff404) at
/usr/src/php5-200307231530/sapi/cli/php_cli.c:910
#8 0x420156a4 in __libc_start_main () from /lib/tls/libc.so.6
I hope that helps.
Tom
The problem you found seems identical to the bug #24658.
http://bugs.php.net/bug.php?id=24658
Anyway, thanks for the report.
Moriyoshi
"Tom Fishwick" tom@zworg.com wrote:
Hi, I was trying out the class type hints feature, and
<?
class P { }function func(P $p) { }
$p = new P;
func(&$p);
?>that causes a segfault. Doing function func(P &$p), also causes a
segfault. I'm using todays snapshot. Here's a bt.