From:             swalk at prp dot physik dot tu-darmstadt dot de
Operating system: Any
PHP version:      4.3.2
PHP Bug Type:     Reproducible crash
Bug description:  Net_SmartIRC: $x=new x; if(!$x) ... fails on PHP 4.1.2

Description:
------------
This little script creates a segfault on every version of php i came
across (4.3.2, 4.3.3rc1, 5.0.0b2). When you replace 0 with "0", it works.


Reproduce code:
---------------
<?php
$obj->foo = "bar"; // or anything else that creates an object
print $obj->{0};
?>


Expected result:
----------------
Notice: undefined property: 0... or something alike

Actual result:
--------------
(gdb) bt
#0  0x08146cf8 in zend_hash_find (ht=0x8211f64, arKey=0x0, nKeyLength=4,
pData=0xbfffca9c)
    at /home/et/sources/php-4.3.2/Zend/zend_hash.c:875
#1  0x08151e70 in zend_fetch_property_address_inner (ht=0x8211f64,
op2=0x8219910, Ts=0xbfffcb40, type=0)
    at /home/et/sources/php-4.3.2/Zend/zend_execute.c:199
#2  0x0814c6b9 in zend_fetch_property_address (result=0x82198f0,
op1=0x8215244, op2=0x8219910, Ts=0xbfffcb40, type=0)
    at /home/et/sources/php-4.3.2/Zend/zend_execute.c:930
#3  0x08150e97 in execute (op_array=0x82156a4) at
/home/et/sources/php-4.3.2/Zend/zend_execute.c:1328
#4  0x081426f1 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /home/et/sources/php-4.3.2/Zend/zend.c:869
#5  0x0811d2fb in php_execute_script (primary_file=0xbffff070) at
/home/et/sources/php-4.3.2/main/main.c:1671
#6  0x08153932 in main (argc=4, argv=0xbffff0f4) at
/home/et/sources/php-4.3.2/sapi/cli/php_cli.c:806
#7  0x420158f7 in __libc_start_main () from /lib/i686/libc.so.6


-- 
Edit bug report at http://bugs.php.net/?id=24710&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=24710&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=24710&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=24710&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=24710&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=24710&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=24710&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=24710&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=24710&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=24710&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=24710&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=24710&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24710&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=24710&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=24710&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=24710&r=gnused

Reply via email to