Skip to content

Commit

Permalink
Fixed bug #75230 (Invalid opcode 49/1/8 using opcache)
Browse files Browse the repository at this point in the history
  • Loading branch information
laruence committed Sep 24, 2017
1 parent ccc0a92 commit ed2a5eb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions ext/opcache/Optimizer/zend_optimizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
19 changes: 19 additions & 0 deletions ext/opcache/tests/bug75230.phpt
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ed2a5eb

Please sign in to comment.