Bug #74137 [NEW]: phpdbg test segfault
| From: | julien at lepiller dot eu | Date: | Mon, 20 Feb 2017 19:56:50 +0000 |
| Subject: | Bug #74137 [NEW]: phpdbg test segfault | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-207475@lists.php.net to get a copy of this message | ||
From: julien at lepiller dot eu
Operating system: GNU/Linux
PHP version: 7.1.2
Package: phpdbg
Bug Type: Bug
Bug description:phpdbg test segfault
Description:
------------
the sapi/phpdbg/tests/include_once.phpt and
sapi/phpdbg/tests/phpdbg_get_executable_stream_wrapper.phpt fail with a
segfault after printing the expected output.
It seems that this bug is triggered by the modification time of the
included *.inc files since the tests pass successfully when I touch
them. Setting modification time to 0 with low-level tools (guile's
(utime "test.php" 0 0)) of any included or required file recreates the
crash. Setting it on the php file does not reproduce the crash.
Sufficient command-line to reproduce the crash is `phpdbg -d
"zend_extension=/tmp/guix-build-php-7.1.2.drv-0/php-7.1.2/modules/opcache.so"
-f "test.php"`, where test.php includes or requires a file whose
modification time is 0. Note that phpdbg points to an executable built
by the guix package manager, and has nothing to do with my current
distribution. I could reproduce the crash on GuixSD and Fedora 24.
Actual result:
--------------
#0 zend_hash_destroy (ht=0xfe6538 <phpdbg_globals+1400>) at
/tmp/guix-build-php-7.1.2.drv-0/php-7.1.2/Zend/zend_hash.c:1249
#1 0x0000000000776921 in zm_shutdown_phpdbg (type=<optimized out>,
module_number=<optimized out>) at
/tmp/guix-build-php-7.1.2.drv-0/php-7.1.2/sapi/phpdbg/phpdbg.c:234
#2 0x00000000006d9333 in module_destructor
(module=module@entry=0x10a44a0) at
/tmp/guix-build-php-7.1.2.drv-0/php-7.1.2/Zend/zend_API.c:2499
#3 0x00000000006d23cc in module_destructor_zval (zv=<optimized out>) at
/tmp/guix-build-php-7.1.2.drv-0/php-7.1.2/Zend/zend.c:632
#4 0x00000000006e4229 in _zend_hash_del_el_ex (prev=<optimized out>,
p=<optimized out>, idx=<optimized out>, ht=<optimized out>) at
/tmp/guix-build-php-7.1.2.drv-0/php-7.1.2/Zend/zend_hash.c:998
#5 _zend_hash_del_el (p=0x1073880, idx=47, ht=0xfe30a0
<module_registry>) at
/tmp/guix-build-php-7.1.2.drv-0/php-7.1.2/Zend/zend_hash.c:1021
#6 zend_hash_graceful_reverse_destroy (ht=ht@entry=0xfe30a0
<module_registry>) at
/tmp/guix-build-php-7.1.2.drv-0/php-7.1.2/Zend/zend_hash.c:1477
#7 0x00000000006d781c in zend_destroy_modules () at
/tmp/guix-build-php-7.1.2.drv-0/php-7.1.2/Zend/zend_API.c:1978
#8 0x00000000006d2eb5 in zend_shutdown () at
/tmp/guix-build-php-7.1.2.drv-0/php-7.1.2/Zend/zend.c:871
#9 0x0000000000673acb in php_module_shutdown () at
/tmp/guix-build-php-7.1.2.drv-0/php-7.1.2/main/main.c:2405
#10 0x0000000000444846 in main (argc=69, argv=0x7fffffffd3d8) at
/tmp/guix-build-php-7.1.2.drv-0/php-7.1.2/sapi/phpdbg/phpdbg.c:2156
--
Edit bug report at https://bugs.php.net/bug.php?id=74137&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74137&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74137&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74137&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74137&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74137&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74137&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74137&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74137&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74137&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74137&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74137&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74137&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74137&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74137&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74137&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74137&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74137&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74137&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74137&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74137&r=mysqlcfg