ID: 26487
Updated by: [EMAIL PROTECTED]
Reported By: friosa at pnpitalia dot it
-Status: Open
+Status: Feedback
Bug Type: Reproducible crash
Operating System: athlon suse linux 9
PHP Version: 5.0.0b2 (beta2)
New Comment:
Can you please try adding 'error_reporting(0);' as first line in your
script to see if the crash happens in the error output function.
Previous Comments:
------------------------------------------------------------------------
[2003-12-01 11:34:26] friosa at pnpitalia dot it
??? i don't know gdb but I don't think this is usefull :(
gdb ./bin/php
GNU gdb 5.3.92
(gdb) run -n try2.php
Starting program: /INSTALL/php_latest/bin/php -n try2.php
[New Thread 16384 (LWP 17716)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 17716)]
0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
(gdb)
i've also tryed this:
(gdb) info program
Using the running image of child Thread 16384 (LWP 17593).
Program stopped at 0x0.
It stopped with signal SIGSEGV, Segmentation fault.
(gdb) info threads
* 1 Thread 16384 (LWP 17593) 0x00000000 in ?? ()
warning: Couldn't restore frame in current thread, at frame 0
0x00000000 in ?? ()
(gdb) info all-registers
eax 0x4035a344 1077257028
ecx 0xbfffcd08 -1073754872
edx 0x4035a2ec 1077256940
ebx 0x40359eac 1077255852
esp 0xbfffcc1c 0xbfffcc1c
ebp 0xbfffcd98 0xbfffcd98
esi 0xbfffcd50 -1073754800
edi 0xbfffce74 -1073754508
eip 0x0 0x0
eflags 0x10246 66118
cs 0x23 35
ss 0x2b 43
ds 0x2b 43
es 0x2b 43
fs 0x0 0
gs 0x7 7
st0 0 (raw 0x00000000000000000000)
st1 [...]
st6 nan(0xc000000000000000) (raw 0x7fffc000000000000000)
st7 -0 (raw 0x80000000000000000000)
fctrl 0x37f 895
fstat 0x4000 16384
ftag 0xffff 65535
fiseg 0x0 0
fioff 0x0 0
foseg 0x0 0
fooff 0x0 0
fop 0x0 0
xmm0 [...]
mxcsr 0x1f80 8064
mm0 [...]
------------------------------------------------------------------------
[2003-12-01 11:12:56] [EMAIL PROTECTED]
(gdb) bt
would output the backtrace..but run php in gdb:
# gdb ./bin/php
(gdb) run -n try.php
<crash>
(gdb) bt
------------------------------------------------------------------------
[2003-12-01 10:19:02] friosa at pnpitalia dot it
may be the attached backtrace is not bery usefull but i don't know how
to use it very well:
uname -a
Linux 2.4.21-144-athlon #1 Fri Nov 14 00:01:10 UTC 2003 i686 athlon
i386 GNU/Linux
I've compiled again (php5-200312011430) with:
./configure \
--enable-debug \
--prefix=/INSTALL/php_latest \
[...] && make && make install
./bin/php try.php
<?php
error_reporting (E_ALL);
$ar = array();
$ar[0] .= "pluto";
?>
Notice: Undefined offset: 0 in /INSTALL/php_latest/try.php on line 4
Segmentation fault
./bin/php try2.php
<?php
error_reporting (E_ALL);
$ar = array();
$ar[] .= "pluto";
?>
Segmentation fault (core dumped)
gdb ./bin/php ./core
(gdb) run ./try.php
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /INSTALL/php_latest/bin/php ./try.php
[New Thread 16384 (LWP 3082)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 3082)]
0x00000000 in ?? ()
(gdb)
please say me if i can do anything else
------------------------------------------------------------------------
[2003-12-01 09:20:43] [EMAIL PROTECTED]
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Can not reproduce, I get this:
Notice: Undefined offset: 0 in test.php on line 3
------------------------------------------------------------------------
[2003-12-01 08:53:12] friosa at pnpitalia dot it
Description:
------------
crash on := assign to a non-existent array element
php 5.00 (beta2)
php 5.00 (200311291630)
hope that the example i easy enough, i'm not in condition now to put
here a back trace sorry :( i will try it later.
./configure
--prefix=/usr/local
--with-config-file-path=/etc/php5.ini
--disable-posix
--disable-session
--disable-tokenizer
--without-sqlite
--disable-cgi
--disable-shared
--enable-shared=no
--with-mysql
--with-mysql-sock=/var/lib/mysql/mysql.sock
--with-informix=/opt/informix
--with-libxml-dir=/pnp
--with-dom=/pnp
--with-dom-xslt=/pnp
--with-dom-exslt=/pnp
--enable-simplexml
--enable-pcntl
--enable-sigchild
--enable-mime-magic
--with-gnu-ld
--with-pcre-regex
--enable-ftp
[PHP Modules]
ctype
dom
ftp
informix
libxml
mysql
pcntl
pcre
simplexml
standard
xml
[Zend Modules]
Reproduce code:
---------------
#! /usr/local/bin/php
# try.php
<?php
$ar = array();
$ar[0] .= "pluto";
?>
./try.php
Segmentation fault
Expected result:
----------------
$ar[0] == "pluto";
OR
an error displayed
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26487&edit=1