Bug #75837 [NEW]: Segfault with Opcache and error suppression
| From: | dzuelke at gmail dot com | Date: | Wed, 17 Jan 2018 22:50:32 +0000 |
| Subject: | Bug #75837 [NEW]: Segfault with Opcache and error suppression | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-213595@lists.php.net to get a copy of this message | ||
From: dzuelke at gmail dot com
Operating system: macOS 10.13.2
PHP version: 7.2.1
Package: opcache
Bug Type: Bug
Bug description:Segfault with Opcache and error suppression
Description:
------------
Pretty simple to reproduce. Happens only when the variable is not
initialized first. Also sometimes requires two or three invocations
until it first crashes, no idea why. Needs opcache.enable_cli=1 of
course to reproduce.
Does not happen on 7.1.13. Also happens on other OSes (e.g. Ubuntu
14/16, with self-built PHP).
Test script:
---------------
<?php
function foo() {
@$bar++;
}
foo();
Actual result:
--------------
$ gdb php-7.2.1/bin/php
(gdb) run -dzend_extension=opcache.so -dopcache.enable_cli=1
sigsegv72.php
Starting program: php-7.2.1/bin/php -dzend_extension=opcache.so
-dopcache.enable_cli=1 sigsegv72.php
[New Thread 0x1703 of process 46816]
warning: unhandled dyld version (15)
Thread 2 received signal SIGSEGV, Segmentation fault.
0x0000000100636c5b in execute_ex (ex=0x101222030)
at Zend/zend_vm_execute.h:59726
59726 if (UNEXPECTED((ret =
((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU))
!= 0)) {
(gdb) bt
#0 0x0000000100636c5b in execute_ex (ex=0x101222030)
at Zend/zend_vm_execute.h:59726
#1 0x0000000100636e6a in zend_execute (op_array=0x10127b600,
return_value=0x0)
at Zend/zend_vm_execute.h:63763
#2 0x00000001005cdc92 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at Zend/zend.c:1496
#3 0x0000000100520932 in php_execute_script
(primary_file=0x7ffeefbff318)
at main/main.c:2590
#4 0x00000001006f3d9d in do_cli (argc=4, argv=0x7ffeefbffa40)
at sapi/cli/php_cli.c:1011
#5 0x00000001006f2d2c in main (argc=4, argv=0x7ffeefbffa40)
at sapi/cli/php_cli.c:1404
--
Edit bug report at https://bugs.php.net/bug.php?id=75837&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75837&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75837&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75837&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75837&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75837&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75837&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75837&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75837&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75837&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75837&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75837&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75837&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75837&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75837&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75837&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75837&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75837&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75837&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75837&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75837&r=mysqlcfg