summaryrefslogtreecommitdiff
path: root/ext/opcache
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-05-04 14:52:18 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-05-04 14:52:18 +0200
commit733d84dbdf8f278fc0060a4fb5b2766c035c3b1f (patch)
treec263fbb7998b823f8994e0dd791ea2464ec15f3a /ext/opcache
parent9c5d9b492512cf54c8bf791b31fb0926d267ccb0 (diff)
parent7c1316ec6a726adaf96b9101054b85bbd763c14f (diff)
downloadphp-git-733d84dbdf8f278fc0060a4fb5b2766c035c3b1f.tar.gz
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Fixed bug #79535
Diffstat (limited to 'ext/opcache')
-rw-r--r--ext/opcache/Optimizer/zend_optimizer.c1
-rw-r--r--ext/opcache/tests/bug79535.phpt15
2 files changed, 16 insertions, 0 deletions
diff --git a/ext/opcache/Optimizer/zend_optimizer.c b/ext/opcache/Optimizer/zend_optimizer.c
index 0b4181c051..dda9e86e53 100644
--- a/ext/opcache/Optimizer/zend_optimizer.c
+++ b/ext/opcache/Optimizer/zend_optimizer.c
@@ -384,6 +384,7 @@ int zend_optimizer_update_op2_const(zend_op_array *op_array,
(opline + 1)->op2.var == opline->result.var) {
return 0;
}
+ /* break missing intentionally */
case ZEND_INSTANCEOF:
REQUIRES_STRING(val);
drop_leading_backslash(val);
diff --git a/ext/opcache/tests/bug79535.phpt b/ext/opcache/tests/bug79535.phpt
new file mode 100644
index 0000000000..0a0b53fb11
--- /dev/null
+++ b/ext/opcache/tests/bug79535.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #79535: PHP crashes with specific opcache.optimization_level
+--INI--
+opcache.optimization_level=0x000000a0
+--FILE--
+<?php
+function create() {
+ $name = stdClass::class;
+ return new $name;
+}
+var_dump(create());
+?>
+--EXPECT--
+object(stdClass)#1 (0) {
+}