php-src/Zend/tests/assign_coalesce_006.phpt
Nikita Popov 9659562cb5 Fix use-after-free with delayed interned memoized const operand
We should addref CONST operands during memoization, as they might
be destroyed by later compilation, e.g. through interning.
2019-10-04 10:38:11 +02:00

13 lines
204 B
PHP

--TEST--
Null coalesce assign with memoized constant operand that is later interned (OSS-Fuzz #17903)
--FILE--
<?php
$foo[__DIR__] ??= 42;
var_dump($foo);
?>
--EXPECTF--
array(1) {
["%s"]=>
int(42)
}