Skip to content

Commit a360b17

Browse files
committed
Add test for GH-15903
1 parent 9cb48c8 commit a360b17

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

ext/opcache/tests/jit/gh15903.phpt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--TEST--
2+
GH-15903 (Core dumped in ext/opcache/jit/ir/ir_ra.c)
3+
--EXTENSIONS--
4+
opcache
5+
--INI--
6+
opcache.jit=1002
7+
opcache.jit_buffer_size=64M
8+
--FILE--
9+
<?php
10+
for ($i = 0; $i < 2; ++$i) { //This must run >=2 (increasing the number of elements in the array *2 will not do)
11+
foreach (array_fill(0, 389, 'x') as &$params) { //Will not trigger <389
12+
$x[] = new foo;
13+
}
14+
}
15+
?>
16+
--EXPECTF--
17+
Fatal error: Uncaught Error: Class "foo" not found in %sgh15903.php:4
18+
Stack trace:
19+
#0 {main}
20+
thrown in %sh15903.php on line 4

0 commit comments

Comments
 (0)