Skip to content

Commit ed2a5eb

Browse files
committed
Fixed bug #75230 (Invalid opcode 49/1/8 using opcache)
1 parent ccc0a92 commit ed2a5eb

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ PHP NEWS
1616
- MySQLi:
1717
. Fixed bug #75018 (Data corruption when reading fields of bit type). (Anatol)
1818

19+
- Opcache:
20+
. Fixed bug #75230 (Invalid opcode 49/1/8 using opcache). (Laruence)
21+
1922
- PCRE:
2023
. Fixed bug ##75223 (PCRE JIT broken in 7.2). (Dmitry)
2124

ext/opcache/Optimizer/zend_optimizer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ int zend_optimizer_update_op1_const(zend_op_array *op_array,
260260
{
261261
switch (opline->opcode) {
262262
case ZEND_FREE:
263+
case ZEND_CHECK_VAR:
263264
MAKE_NOP(opline);
264265
zval_ptr_dtor_nogc(val);
265266
return 1;

ext/opcache/tests/bug75230.phpt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
--TEST--
2+
Bug #75230 (Invalid opcode 49/1/8 using opcache)
3+
--INI--
4+
opcache.enable=1
5+
opcache.enable_cli=1
6+
opcache.optimization_level=-1
7+
--SKIPIF--
8+
<?php require_once('skipif.inc'); ?>
9+
--FILE--
10+
<?php
11+
function f() {
12+
$retval = false;
13+
if ($retval) { }
14+
}
15+
f();
16+
exit("OK");
17+
?>
18+
--EXPECT--
19+
OK

0 commit comments

Comments
 (0)