Skip to content

Commit f55b413

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Fixed bug #79535
2 parents 7561f91 + 733d84d commit f55b413

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

ext/opcache/Optimizer/zend_optimizer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ int zend_optimizer_update_op2_const(zend_op_array *op_array,
352352
(opline + 1)->op2.var == opline->result.var) {
353353
return 0;
354354
}
355+
/* break missing intentionally */
355356
case ZEND_INSTANCEOF:
356357
REQUIRES_STRING(val);
357358
drop_leading_backslash(val);

ext/opcache/tests/bug79535.phpt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--TEST--
2+
Bug #79535: PHP crashes with specific opcache.optimization_level
3+
--INI--
4+
opcache.optimization_level=0x000000a0
5+
--FILE--
6+
<?php
7+
function create() {
8+
$name = stdClass::class;
9+
return new $name;
10+
}
11+
var_dump(create());
12+
?>
13+
--EXPECT--
14+
object(stdClass)#1 (0) {
15+
}

0 commit comments

Comments
 (0)