mirror of
https://github.com/php/php-src.git
synced 2024-12-18 06:21:41 +08:00
ddf8910237
We can't remove a trivial phi of the form x = phi(x), because we don't have a replacement value. We could drop the whole block though. SCCP would normally do this, but in this particular case we only determine non-reachability based on type information. Fixes oss-fuzz #39316.
16 lines
314 B
PHP
16 lines
314 B
PHP
--TEST--
|
|
Unreachable phi cycle
|
|
--FILE--
|
|
<?php
|
|
// The inner loop is dead, but SCCP reachability analysis doesn't realize this,
|
|
// as this is determined based on type information.
|
|
function test() {
|
|
for (; $i--;) {
|
|
for(; x;);
|
|
}
|
|
}
|
|
test();
|
|
?>
|
|
--EXPECTF--
|
|
Warning: Undefined variable $i in %s on line %d
|