PHP 4.0 Bug #6096: Script causes segfault
| From: | mphillip at commnav dot com | Date: | Fri, 11 Aug 2000 03:54:53 +0000 |
| Subject: | PHP 4.0 Bug #6096: Script causes segfault | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-28449@lists.php.net to get a copy of this message | ||
From: mphillip@commnav.com
Operating system: Linux 2.2.15 (Mandrake 7.1) and Linux 2.2.12 (Redhat 6.1)
PHP version: 4.0 Latest CVS (10/08/2000)
PHP Bug Type: Reproduceable crash
Bug description: Script causes segfault
Very long complicated script causes php to segfault, both as an Apache Module and from the command
line. Sorry I can't reproduce a short script that reproduces this or narrow it down for you.
I moved all the includes into the main file and it is 165K in length. This script works fine in PHP
4.0.0. Following is a gdb backtrace from the core file generated from the commnad line. I can
provide the code that generated this, but only to individual people, not the list (our product
hasn't been released yet). The problem moves around the script. If you add HTML code to the
top of the file the crashes moved that many characters closer to the beginning. Thanks for creating
an (otherwise) useful language! Let me know if I can provide any more information.
-Matt Phillips
www.commnav.com
Systems Administator
# gdb /usr/local/bin/php core
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i586-mandrake-linux"...
Core was generated by `/usr/local/bin/php index.php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libgdbm.so.2...done.
Reading symbols from /lib/libpam.so.0...done.
Reading symbols from /usr/lib/libimap.so.4...done.
Reading symbols from /lib/libdl.so.2...done.
Reading symbols from /usr/lib/libldap.so.1...done.
Reading symbols from /usr/lib/liblber.so.1...done.
Reading symbols from /lib/libresolv.so.2...done.
Reading symbols from /lib/libm.so.6...done.
Reading symbols from /lib/libcrypt.so.1...done.
Reading symbols from /lib/libnsl.so.1...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
Reading symbols from /lib/libnss_files.so.2...done.
Reading symbols from /usr/lib/gconv/ISO8859-1.so...done.
Reading symbols from /lib/libnss_nisplus.so.2...done.
Reading symbols from /lib/libnss_nis.so.2...done.
Reading symbols from /lib/libnss_dns.so.2...done.
#0 0x6c61636f in ?? ()
(gdb) bt
#0 0x6c61636f in ?? ()
#1 0x80d9da6 in _zval_dtor (zvalue=0x814f1c4) at zend_variables.c:69
#2 0x81063f3 in zend_assign_to_variable (result=0x0, op1=0x82d3c64, op2=0x0, value=0x832419c,
type=4, Ts=0xbfffc104) at ./zend_execute.c:357
#3 0x8102f52 in execute (op_array=0x82b674c) at ./zend_execute.c:1707
#4 0x810239d in execute (op_array=0x817d77c) at ./zend_execute.c:1559
#5 0x80daf3b in zend_execute_scripts (type=8, file_count=3) at zend.c:711
#6 0x8061f48 in php_execute_script (primary_file=0xbffff918) at main.c:1166
#7 0x8060664 in main (argc=2, argv=0xbffff994) at cgi_main.c:708
(gdb)
Here is the configure script used to compile:
./configure \
--with-mysql \
--with-ldap \
--with-imap \
--with-gettext \
--with-config-file-path=/usr/local/apache/conf \
--enable-track-vars