Bug #69823 [NEW]: PHP 7.0.0alpha1 segmentation fault when exactly 33 extensions are loaded
| From: | andy at webtatic dot com | Date: | Sat, 13 Jun 2015 21:36:26 +0000 |
| Subject: | Bug #69823 [NEW]: PHP 7.0.0alpha1 segmentation fault when exactly 33 extensions are loaded | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-193428@lists.php.net to get a copy of this message | ||
From: andy at webtatic dot com
Operating system: CentOS 7
PHP version: 7.0.0alpha1
Package: Reproducible crash
Bug Type: Bug
Bug description:PHP 7.0.0alpha1 segmentation fault when exactly 33 extensions are loaded
Description:
------------
When 33 extensions would be loaded (either dynamic or static), PHP
7.0.0alpha1 segmentation faults.
This doesn't appear to be any combination of 33 extensions.
gdb gives the following error:
Program received signal SIGSEGV, Segmentation fault.
zend_startup_module_ex (module=0xa) at
/home/vagrant/rpmbuild/BUILD/test/Zend/zend_API.c:1818
1818 if (module->module_started)
and backtrace:
(gdb) backtrace
#0 zend_startup_module_ex (module=0xa) at
/home/vagrant/rpmbuild/BUILD/test/Zend/zend_API.c:1818
#1 0x00000000005eb499 in zend_hash_apply (ht=ht@entry=0xa7ede0
<module_registry>, apply_func=apply_func@entry=0x5de100
<zend_startup_module_zval>)
at /home/vagrant/rpmbuild/BUILD/test/Zend/zend_hash.c:1434
#2 0x00000000005de3aa in zend_startup_modules () at
/home/vagrant/rpmbuild/BUILD/test/Zend/zend_API.c:1986
#3 0x000000000057d34e in php_module_startup (sf=<optimized out>,
additional_modules=additional_modules@entry=0x0,
num_additional_modules=num_additional_modules@entry=0)
at /home/vagrant/rpmbuild/BUILD/test/main/main.c:2198
#4 0x0000000000661b9d in php_cli_startup (sapi_module=<optimized out>)
at /home/vagrant/rpmbuild/BUILD/test/sapi/cli/php_cli.c:419
#5 0x0000000000428260 in main (argc=1, argv=0xa824f0) at
/home/vagrant/rpmbuild/BUILD/test/sapi/cli/php_cli.c:1314
Test script:
---------------
./configure --disable-phpdbg --libdir=/usr/lib64/php --without-readline
--with-libedit --cache-file=../config.cache \
--with-libdir=lib64 \
--with-config-file-path=/etc \
--with-config-file-scan-dir=/etc/php.d \
--disable-debug \
--with-pic \
--disable-rpath \
--without-pear \
--with-freetype-dir=/usr \
--with-png-dir=/usr \
--with-xpm-dir=/usr \
--enable-gd-native-ttf \
--without-gdbm \
--with-jpeg-dir=/usr \
--with-openssl \
--with-pcre-regex \
--with-zlib \
--with-layout=GNU \
--with-kerberos \
--with-libxml-dir=/usr \
--with-mhash \
--enable-dtrace \
--with-imap=shared --with-imap-ssl \
--enable-mbstring=shared \
--enable-mbregex \
--with-gd=shared \
--with-gmp=shared \
--enable-calendar=shared \
--enable-bcmath=shared \
--with-bz2=shared \
--enable-ctype=shared \
--enable-dba=shared --with-db4=/usr \
--enable-exif=shared \
--enable-ftp=shared \
--with-gettext=shared \
--with-iconv=shared \
--enable-sockets=shared \
--enable-tokenizer=shared \
--with-xmlrpc=shared \
--with-ldap=shared --with-ldap-sasl \
--enable-mysqlnd=shared \
--with-mysqli=shared,mysqlnd \
--with-interbase=shared,/usr/lib64/firebird \
--with-pdo-firebird=shared,/usr/lib64/firebird \
--enable-dom=shared \
--with-pgsql=shared \
--enable-simplexml=shared \
--enable-xml=shared \
--enable-wddx=shared \
--with-snmp=shared,/usr \
--enable-soap=shared \
--with-xsl=shared,/usr \
--enable-xmlreader=shared --enable-xmlwriter=shared \
--with-curl=shared,/usr \
--enable-pdo=shared \
--with-pdo-odbc=shared,unixODBC,/usr \
--with-pdo-mysql=shared,mysqlnd \
--with-pdo-pgsql=shared,/usr \
--with-pdo-sqlite=shared,/usr \
--with-pdo-dblib=shared,/usr \
--with-sqlite3=shared,/usr \
--enable-json=shared \
--enable-zip=shared \
--with-pspell=shared \
--enable-phar=shared \
--with-mcrypt=shared,/usr \
--with-tidy=shared,/usr \
--enable-sysvmsg=shared --enable-sysvshm=shared
--enable-sysvsem=shared \
--enable-shmop=shared \
--enable-posix=shared \
--with-unixODBC=shared,/usr \
--enable-fileinfo=shared \
--enable-intl=shared \
--with-icu-dir=/usr \
--with-enchant=shared,/usr \
--enable-opcache
make
sudo make install
cp php.ini-production /etc/php.ini
mkdir /etc/php.d
for mod in bz2 calendar ctype curl exif file info get text gap iconv son
phar shmop simplexml sockets tokenizer xml zip; do
cat > /etc/php.d/${mod} <<EOF
extension=${mod}.so
EOF
done
php -m
Expected result:
----------------
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
exif
fileinfo
filter
ftp
gettext
gmp
hash
iconv
json
libxml
mbstring
mhash
openssl
pcre
Phar
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
standard
tokenizer
xml
zip
zlib
[Zend Modules]
Actual result:
--------------
Segmentation fault
--
Edit bug report at https://bugs.php.net/bug.php?id=69823&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69823&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69823&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69823&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69823&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69823&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69823&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69823&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69823&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69823&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69823&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69823&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69823&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69823&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69823&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69823&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69823&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69823&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69823&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69823&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69823&r=mysqlcfg