mirror of
https://github.com/php/php-src.git
synced 2026-04-27 18:23:26 +02:00
493c91c742
In the attached test case we ended up not updating a leftover MATCH jump in the unreachable_free block. There's different ways this can be addressed, but in this case we can just make sure that a new block is started after the loop free, which will allow it to be dropped as unreachable. We only need to retain the free itself for live-range reconstruction. Fixes oss-fuzz #39516.
19 lines
270 B
PHP
19 lines
270 B
PHP
--TEST--
|
|
Corrupted CFG due to unreachable free with match
|
|
--FILE--
|
|
<?php
|
|
function test() {
|
|
var_dump(match(x){});
|
|
match(y){
|
|
3, 4 => 5,
|
|
};
|
|
}
|
|
try {
|
|
test();
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
Undefined constant "x"
|