php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30639 segfault at Zend/zend_alloc.c:241
Submitted: 2004-11-01 03:41 UTC Modified: 2004-11-01 07:53 UTC
From: robbat2 at gentoo dot org Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 4.3.9 OS: Gentoo Linux
Private report: No CVE-ID:
 [2004-11-01 03:41 UTC] robbat2 at gentoo dot org
Description:
------------
During PHP install, the PHP cli binary crashes when doing the PEAR install:

>>> Install php-4.3.9 into /var/tmp/portage/php-4.3.9/image/ category dev-php
Installing PHP CLI binary:        /var/tmp/portage/php-4.3.9/image//usr/bin/
Installing PHP CLI man page:      /var/tmp/portage/php-4.3.9/image//usr/share/man/man1/
Installing PEAR environment:      /var/tmp/portage/php-4.3.9/image//usr/lib/php/
make[1]: *** [install-pear-installer] Segmentation fault (core dumped)
make: *** [install-pear] Error 2


Reproduce code:
---------------
"make INSTALL_ROOT=/var/tmp/portage/php-4.3.9/image/ install install-modules install-programs"

Exact configure line was: ./configure  --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-cgi --enable-cli --with-ndbm=/usr --with-db4=/usr --with-mcrypt=/usr --with-mhash=/usr --without-interbase --without-ming --without-swf --without-sybase --with-gdbm=/usr --without-fdftk --without-java --with-mcal=/usr --without-unixODBC --without-pgsql --with-snmp=/usr --enable-ucd-snmp-hack --without-gmp --without-mssql --with-pdflib=/usr --with-gd --enable-gd-native-ttf --with-png=/usr --with-png-dir=/usr --with-jpeg=/usr --with-jpeg-dir=/usr --enable-exif --with-tiff=/usr --with-tiff-dir=/usr --with-mysql=/usr --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-freetype-dir=/usr --with-ttf=/usr --with-t1lib=/usr --without-gettext --without-qtdom --with-pspell=/usr --with-openssl=/usr --with-imap=/usr --without-ldap --with-dom=/usr --with-dom-xslt=/usr --with-dom-exslt=/usr --without-kerberos --with-pam --disable-memory-limit --enable-ipv6 --without-yaz --disable-debug --with-curlwrappers --with-curl=/usr --enable-dbx --with-imap-ssl --with-zlib=/usr --with-zlib-dir=/usr --with-sablot=/usr --enable-xslt --with-xslt-sablot --with-xmlrpc --enable-wddx --with-xml --enable-mbstring=all --enable-mbregex --with-bz2=/usr --with-crack=/usr --with-cdb --enable-pcntl --enable-bcmath --enable-calendar --enable-dbase --enable-filepro --enable-ftp --with-mime-magic=/usr/share/misc/file/magic.mime --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --with-iconv --enable-shmop --enable-dio --enable-yp --with-readline=/usr --with-ncurses=/usr --enable-inline-optimization --enable-track-vars --enable-trans-sid --enable-versioning --with-config-file-path=/etc/php/cli-php4

and CFLAGS were only '-g', but I can reproduce this with a very stripped set of configure flags as well.

php.ini is the stock php.ini-dist.

Expected result:
----------------
PHP should install fine.

Actual result:
--------------
Backtrace from coredump:

#0  0x0824d605 in _efree (ptr=0x0)
    at /var/tmp/portage/php-4.3.9/work/php-4.3.9/Zend/zend_alloc.c:241
241             CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p->size);
(gdb) bt
#0  0x0824d605 in _efree (ptr=0x0)
    at /var/tmp/portage/php-4.3.9/work/php-4.3.9/Zend/zend_alloc.c:241
#1  0x082623a8 in zend_hash_destroy (ht=0x850762c)
    at /var/tmp/portage/php-4.3.9/work/php-4.3.9/Zend/zend_hash.c:563
#2  0x08253d62 in shutdown_executor ()
    at /var/tmp/portage/php-4.3.9/work/php-4.3.9/Zend/zend_execute_API.c:186
#3  0x0825ceb5 in zend_deactivate ()
    at /var/tmp/portage/php-4.3.9/work/php-4.3.9/Zend/zend.c:667
#4  0x0822d07c in php_request_shutdown (dummy=0x0)
    at /var/tmp/portage/php-4.3.9/work/php-4.3.9/main/main.c:996
#5  0x0827dd58 in main (argc=12, argv=0xbfffd5b4)
    at /var/tmp/portage/php-4.3.9/work/php-4.3.9/sapi/cli/php_cli.c:873


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-01 04:07 UTC] robbat2 at gentoo dot org
Some more output, configured with :
./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-cgi --enable-cli --without-ndbm --without-db4 --without-mcrypt --without-mhash --without-interbase --without-ming --without-swf --without-sybase --without-gdbm --without-fdftk --without-java --without-mcal --without-unixODBC --without-pgsql --without-snmp --without-gmp --without-mssql --without-pdflib --without-gd --disable-gd-native-ttf --without-png --without-jpeg --disable-exif --without-tiff --without-mysql --without-freetype-dir --without-ttf --without-t1lib --without-gettext --without-qtdom --without-pspell --without-openssl --without-imap --without-ldap --with-dom=/usr --without-dom-xslt --without-dom-exslt --without-kerberos --without-pam --disable-memory-limit --disable-ipv6 --without-yaz --without-curlwrappers --without-curl --disable-dbx --without-imap-ssl --with-zlib --with-sablot=/usr --disable-xslt --without-xslt-sablot --without-xmlrpc --disable-wddx --without-xml --disable-mbstring --disable-mbregex --without-bz2 --without-crack --without-cdb --disable-pcntl --disable-bcmath --disable-calendar --disable-dbase --disable-filepro --disable-ftp --without-mime-magic --disable-sockets --disable-sysvsem --disable-sysvshm --disable-sysvmsg --without-iconv --disable-shmop --disable-dio --disable-yp --without-readline --without-ncurses --disable-inline-optimization --enable-versioning --with-config-file-path=/etc/php/cli-php4 --enable-debug

I get:
>>> Install php-4.3.9 into /var/tmp/portage/php-4.3.9/image/ category dev-php
Installing PHP CLI binary:        /var/tmp/portage/php-4.3.9/image//usr/bin/
Installing PHP CLI man page:      /var/tmp/portage/php-4.3.9/image//usr/share/man/man1/
Installing PEAR environment:      /var/tmp/portage/php-4.3.9/image//usr/lib/php/
Could not startup.
[Sun Oct 31 20:05:19 2004]  Script:  '/var/tmp/portage/php-4.3.9/work/php-4.3.9/pear/install-pear.php'
---------------------------------------
/var/tmp/portage/php-4.3.9/work/php-4.3.9/Zend/zend_ptr_stack.c(77) : Block 0x081FD808 status:
Beginning:      Overrun (magic=0x081FDDC8, expected=0x7312F8DC)
      End:      Unknown
---------------------------------------
/var/tmp/portage/php-4.3.9/work/php-4.3.9/Zend/zend_hash.c(547) : ht=0x081ba8cc is already destroyed
/var/tmp/portage/php-4.3.9/work/php-4.3.9/Zend/zend_hash.c(762) : ht=0x081bb7a0 is being destroyed
/var/tmp/portage/php-4.3.9/work/php-4.3.9/Zend/zend_hash.c(673) : ht=0x081ba9e8 is already destroyed
/var/tmp/portage/php-4.3.9/work/php-4.3.9/Zend/zend_hash.c(108) : Bailed out without a bailout address!
make[1]: *** [install-pear-installer] Error 255
make: *** [install-pear] Error 2

binutils:
GNU ld version 2.15.90.0.1.1 20040303

gcc:
Configured with: /var/tmp/portage/gcc-3.3.4-r1/work/gcc-3.3.4/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.3 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3/info --enable-shared --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib --enable-languages=c,c++,f77 --enable-threads=posix --enable-long-long --disable-checking --disable-libunwind-exceptions --enable-cstdio=stdio --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/g++-v3 --with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext --disable-multilib --enable-__cxa_atexit --enable-clocale=generic
Thread model: posix
gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)
 [2004-11-01 07:53 UTC] derick@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Duplicate of #30637
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 16 16:02:23 2014 UTC