com php-src: Fixed bug #75230 (Invalid opcode 49/1/8 using opcache): NEWS ext/opcache/Optimizer/zend_optimizer.c ext/opcache/tests/ bug75230.phpt

From: Date: Sun, 24 Sep 2017 10:01:29 +0000
Subject: com php-src: Fixed bug #75230 (Invalid opcode 49/1/8 using opcache): NEWS ext/opcache/Optimizer/zend_optimizer.c ext/opcache/tests/ bug75230.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-99526@lists.php.net to get a copy of this message
Commit: ed2a5ebaeb9fa1d78832ce08a2664bd3d47babbe Author: Xinchen Hui <laruence@gmail.com> Sun, 24 Sep 2017 18:01:29 +0800 Parents: ccc0a925049e694791e64ca299d94fe91d69ede5 Branches: PHP-7.2 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ed2a5ebaeb9fa1d78832ce08a2664bd3d47babbe Log: Fixed bug #75230 (Invalid opcode 49/1/8 using opcache) Bugs: https://bugs.php.net/75230 Changed paths: M NEWS M ext/opcache/Optimizer/zend_optimizer.c A ext/opcache/tests/bug75230.phpt Diff: diff --git a/NEWS b/NEWS index e16d63c..ab3a5b9 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,9 @@ PHP NEWS - MySQLi: . Fixed bug #75018 (Data corruption when reading fields of bit type). (Anatol) +- Opcache: + . Fixed bug #75230 (Invalid opcode 49/1/8 using opcache). (Laruence) + - PCRE: . Fixed bug ##75223 (PCRE JIT broken in 7.2). (Dmitry) diff --git a/ext/opcache/Optimizer/zend_optimizer.c b/ext/opcache/Optimizer/zend_optimizer.c index cc197c0..1fc81e1 100644 --- a/ext/opcache/Optimizer/zend_optimizer.c +++ b/ext/opcache/Optimizer/zend_optimizer.c @@ -260,6 +260,7 @@ int zend_optimizer_update_op1_const(zend_op_array *op_array, { switch (opline->opcode) { case ZEND_FREE: + case ZEND_CHECK_VAR: MAKE_NOP(opline); zval_ptr_dtor_nogc(val); return 1; diff --git a/ext/opcache/tests/bug75230.phpt b/ext/opcache/tests/bug75230.phpt new file mode 100644 index 0000000..13100b3 --- /dev/null +++ b/ext/opcache/tests/bug75230.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug #75230 (Invalid opcode 49/1/8 using opcache) +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.optimization_level=-1 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function f() { + $retval = false; + if ($retval) { } +} +f(); +exit("OK"); +?> +--EXPECT-- +OK

« previous php.cvs (#99526) next »