From: robbat2 at gentoo dot org
Operating system: Gentoo Linux
PHP version: 4.3.9
PHP Bug Type: Reproducible crash
Bug description: segfault at Zend/zend_alloc.c:241
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
--
Edit bug report at http://bugs.php.net/?id=30639&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30639&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30639&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30639&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30639&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30639&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30639&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30639&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30639&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30639&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30639&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30639&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30639&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30639&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30639&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30639&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30639&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30639&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30639&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30639&r=mysqlcfg