Bug #75837 [Opn]: Segfault with Opcache and error suppression
| From: | nikic@php.net | Date: | Wed, 17 Jan 2018 23:19:36 +0000 |
| Subject: | Bug #75837 [Opn]: Segfault with Opcache and error suppression | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-213597@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75837&edit=1
ID: 75837
Updated by: nikic@php.net
Reported by: dzuelke at gmail dot com
Summary: Segfault with Opcache and error suppression
Status: Open
Type: Bug
Package: opcache
Operating System: macOS 10.13.2
PHP Version: 7.2.1
Block user comment: N
Private report: N
New Comment:
I can't reproduce this with current 7.2 or master.
Previous Comments:
------------------------------------------------------------------------
[2018-01-17 22:50:31] dzuelke at gmail dot com
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 this bug report at https://bugs.php.net/bug.php?id=75837&edit=1