|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-07-15 12:48 UTC] zeev@php.net
[2001-07-19 12:05 UTC] zeev@php.net
[2001-07-19 14:33 UTC] zeev@php.net
[2001-12-12 08:36 UTC] yohgaki@php.net
[2002-04-19 09:31 UTC] yohgaki@php.net
[2002-08-02 16:29 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 12:00:01 2025 UTC |
function &erm($key) { return @$arr[$key]; } $foo = erm('foo'); $bar = erm('bar'); (gdb) run bug3.php Starting program: /usr/local/bin/php bug3.php Program received signal SIGSEGV, Segmentation fault. 0x80a29e9 in execute (op_array=0x81d3348) at ./zend_execute.c:1592 1592 SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr_ptr); (gdb) p retval_ptr_ptr $1 = (zval **) 0x0 (gdb) bt #0 0x80a29e9 in execute (op_array=0x81d3348) at ./zend_execute.c:1592 #1 0x80a26a8 in execute (op_array=0x81cdf5c) at ./zend_execute.c:1544 #2 0x8097234 in zend_execute_scripts (type=8, file_count=3) at zend.c:752 #3 0x8065b4f in php_execute_script (primary_file=0xbffff694) at main.c:1206 #4 0x8061173 in main (argc=2, argv=0xbffff724) at cgi_main.c:718 (gdb) list 1587 (opline->op1.op_type != IS_CONST) && 1588 (opline->op1.op_type != IS_TMP_VAR)) { 1589 1590 retval_ptr_ptr = get_zval_ptr_ptr(&opline->op1, Ts, BP_VAR_W); 1591 1592 SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr_ptr); 1593 1594 (*retval_ptr_ptr)->refcount++; 1595 (*EG(return_value_ptr_ptr)) = (*retval_ptr_ptr); 1596 } else { notice that the second call [ erm('bar')] actually trigger the segfault. patch: I dunno, Zeev somebody? :)