php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6096 Script causes segfault
Submitted: 2000-08-10 23:54 UTC Modified: 2000-08-30 15:20 UTC
From: mphillip at commnav dot com Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0 Latest CVS (10/08/2000) OS: Linux 2.2.15 (Mandrake 7.1) and
Private report: No CVE-ID: None
 [2000-08-10 23:54 UTC] mphillip at commnav dot com
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 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-30 15:20 UTC] mphillip at commnav dot com
This seems to be fixed in 4.0.2.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Oct 11 02:00:01 2026 UTC