From: filip at prochazka dot su
Operating system: Linux
PHP version: 7.0.0alpha1
Package: Reproducible crash
Bug Type: Bug
Bug description:SIGSEGV in zend_hash_index_find_bucket
Description:
------------
I just compiled the 7.0.0alpha1
Configure Command => './configure' '--with-openssl'
'--with-kerberos'
'--with-zlib' '--with-bz2' '--with-curl' '--enable-dba'
'--enable-ftp'
'--with-gd' '--with-jpeg-dir=/usr/include'
'--with-png-dir=/usr/include'
'--with-zlib-dir=/usr/include' '--with-xpm-dir=/usr/include'
'--with-freetype-dir=/usr/lib' '--enable-gd-native-ttf'
'--with-gettext'
'--with-mhash' '--with-imap' '--with-imap-ssl'
'--enable-mbstring'
'--with-mcrypt' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd'
'--with-pdo-pgsql' '--with-pgsql' '--enable-shmop'
'--enable-soap'
'--enable-sockets' '--with-readline' '--enable-sysvmsg'
'--with-tidy'
'--with-xmlrpc' '--with-xsl' '--enable-zip' '--enable-intl'
'--enable-fpm' '--enable-pcntl' '--enable-bcmath'
'--with-gmp'
'--prefix=/usr/php/7.0.0alpha1/' '--enable-phpdbg' '--enable-debug'
'--without-pear'
and tried running our application. I'm not sure how to isolate the
crashing code.
Actual result:
--------------
$ gdb /usr/php/7.0.0alpha1/sbin/php-fpm /tmp/core-php-fpm.16589
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
This GDB was configured as "x86_64-linux-gnu".
Reading symbols from /usr/php/7.0.0alpha1/sbin/php-fpm...done.
[New LWP 16589]
[Thread debugging using libthread_db enabled]
Using host libthread_db library
"/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `php-fpm: pool www
'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0000000000ae3517 in zend_hash_index_find_bucket
(ht=0x7f2e1b7066c0, h=0) at /opt/php-7.0.0alpha1/Zend/zend_hash.c:464
464 idx = HT_HASH_EX(arData, nIndex);
(gdb) bt
#0 0x0000000000ae3517 in zend_hash_index_find_bucket
(ht=0x7f2e1b7066c0, h=0) at /opt/php-7.0.0alpha1/Zend/zend_hash.c:464
#1 0x0000000000ae7a18 in zend_hash_index_exists (ht=0x7f2e1b7066c0,
h=0) at /opt/php-7.0.0alpha1/Zend/zend_hash.c:1935
#2 0x00000000008f8c91 in zif_array_key_exists
(execute_data=0x7f2e1c218a20, return_value=0x7f2e1c2185f0) at
/opt/php-7.0.0alpha1/ext/standard/array.c:5009
#3 0x0000000000b2a747 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER () at
/opt/php-7.0.0alpha1/Zend/zend_vm_execute.h:692
#4 0x0000000000b29bab in execute_ex (ex=0x7f2e1c216010) at
/opt/php-7.0.0alpha1/Zend/zend_vm_execute.h:394
#5 0x0000000000ab8c79 in zend_call_function (fci=0x7fff346aff60,
fci_cache=0x7fff346aff30) at
/opt/php-7.0.0alpha1/Zend/zend_execute_API.c:841
#6 0x00000000008fe9a8 in zif_call_user_func_array
(execute_data=0x7f2e1c215f90, return_value=0x7f2e1c215e90) at
/opt/php-7.0.0alpha1/ext/standard/basic_functions.c:4805
#7 0x0000000000b2a747 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER () at
/opt/php-7.0.0alpha1/Zend/zend_vm_execute.h:692
#8 0x0000000000b29bab in execute_ex (ex=0x7f2e1c215030) at
/opt/php-7.0.0alpha1/Zend/zend_vm_execute.h:394
#9 0x0000000000b29cbe in zend_execute (op_array=0x7f2e1c273000,
return_value=0x0) at /opt/php-7.0.0alpha1/Zend/zend_vm_execute.h:434
#10 0x0000000000ad0a73 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /opt/php-7.0.0alpha1/Zend/zend.c:1389
#11 0x0000000000a3df50 in php_execute_script
(primary_file=0x7fff346b2520) at /opt/php-7.0.0alpha1/main/main.c:2475
#12 0x0000000000ba03b3 in main (argc=3, argv=0x7fff346b4ca8) at
/opt/php-7.0.0alpha1/sapi/fpm/fpm/fpm_main.c:1940
(gdb) frame 4
#4 0x0000000000b29bab in execute_ex (ex=0x7f2e1c216010) at
/opt/php-7.0.0alpha1/Zend/zend_vm_execute.h:394
394 if (UNEXPECTED((ret =
((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU))
!= 0)) {
(gdb) frame 3
#3 0x0000000000b2a747 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER () at
/opt/php-7.0.0alpha1/Zend/zend_vm_execute.h:692
692 fbc->internal_function.handler(call, ret);
(gdb) frame 2
#2 0x00000000008f8c91 in zif_array_key_exists
(execute_data=0x7f2e1c218a20, return_value=0x7f2e1c2185f0) at
/opt/php-7.0.0alpha1/ext/standard/array.c:5009
5009 if (zend_hash_index_exists(array,
Z_LVAL_P(key))) {
(gdb) frame 1
#1 0x0000000000ae7a18 in zend_hash_index_exists (ht=0x7f2e1b7066c0,
h=0) at /opt/php-7.0.0alpha1/Zend/zend_hash.c:1935
1935 p = zend_hash_index_find_bucket(ht, h);
--
Edit bug report at https://bugs.php.net/bug.php?id=69816&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69816&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69816&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69816&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69816&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69816&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69816&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69816&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69816&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69816&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69816&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69816&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69816&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69816&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69816&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69816&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69816&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69816&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69816&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69816&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69816&r=mysqlcfg