xref: /PHP-8.3/ext/opcache/tests/jit/bug80959.phpt (revision 9108ac67)
1--TEST--
2Bug #80959: infinite loop in building cfg during JIT compilation
3--EXTENSIONS--
4opcache
5--INI--
6opcache.enable=1
7opcache.enable_cli=1
8opcache.jit_buffer_size=1M
9opcache.jit=tracing
10--FILE--
11<?php
12function test($a, $b) {
13    echo "Start\n";
14    $i = $j = 0;
15    do {
16        $i++;
17        try {
18           continue;
19        } catch (Exception $e) {
20        }
21        do {
22           $j++;
23        } while ($j < $b);
24    } while ($i < $a);
25    echo "Done $i $j\n";
26}
27test(5, 6);
28?>
29--EXPECT--
30Start
31Done 5 0
32