Skip to content

Commit 733d84d

Browse files
committed
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Fixed bug #79535
2 parents 9c5d9b4 + 7c1316e commit 733d84d

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
@@ -384,6 +384,7 @@ int zend_optimizer_update_op2_const(zend_op_array *op_array,
384384
(opline + 1)->op2.var == opline->result.var) {
385385
return 0;
386386
}
387+
/* break missing intentionally */
387388
case ZEND_INSTANCEOF:
388389
REQUIRES_STRING(val);
389390
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)