This commit is contained in:
Nikita Popov 2020-08-31 12:38:11 +02:00
parent 570f463fb8
commit 50975640bc
3 changed files with 24 additions and 0 deletions

4
NEWS
View File

@ -15,6 +15,10 @@ PHP NEWS
- Fileinfo:
. Upgrade to libmagic 5.39. (Anatol)
- Opcache:
. Fixed bug #80030 (Optimizer segfault with isset on static property with
undef dynamic class name). (Nikita)
20 Aug 2020, PHP 8.0.0beta2
- SPL:

19
Zend/tests/bug80030.phpt Normal file
View File

@ -0,0 +1,19 @@
--TEST--
Bug #80030: Optimizer segfault with isset on static property with undef dynamic class name
--FILE--
<?php
function test() {
var_dump(isset($className::$test));
}
test();
?>
--EXPECTF--
Warning: Undefined variable $className in %s on line %d
Fatal error: Uncaught Error: Class name must be a valid object or a string in %s:%d
Stack trace:
#0 %s(%d): test()
#1 {main}
thrown in %s on line %d

View File

@ -377,6 +377,7 @@ int zend_optimizer_update_op2_const(zend_op_array *op_array,
case ZEND_FETCH_STATIC_PROP_UNSET:
case ZEND_FETCH_STATIC_PROP_FUNC_ARG:
case ZEND_UNSET_STATIC_PROP:
case ZEND_ISSET_ISEMPTY_STATIC_PROP:
case ZEND_PRE_INC_STATIC_PROP:
case ZEND_PRE_DEC_STATIC_PROP:
case ZEND_POST_INC_STATIC_PROP: