From a360b1757ea498ed49145084e2e70344b4839ed0 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 18 Sep 2024 09:35:01 +0300 Subject: [PATCH] Add test for GH-15903 --- ext/opcache/tests/jit/gh15903.phpt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 ext/opcache/tests/jit/gh15903.phpt diff --git a/ext/opcache/tests/jit/gh15903.phpt b/ext/opcache/tests/jit/gh15903.phpt new file mode 100644 index 00000000000..6acbc27142f --- /dev/null +++ b/ext/opcache/tests/jit/gh15903.phpt @@ -0,0 +1,20 @@ +--TEST-- +GH-15903 (Core dumped in ext/opcache/jit/ir/ir_ra.c) +--EXTENSIONS-- +opcache +--INI-- +opcache.jit=1002 +opcache.jit_buffer_size=64M +--FILE-- +=2 (increasing the number of elements in the array *2 will not do) +foreach (array_fill(0, 389, 'x') as &$params) { //Will not trigger <389 +$x[] = new foo; +} +} +?> +--EXPECTF-- +Fatal error: Uncaught Error: Class "foo" not found in %sgh15903.php:4 +Stack trace: +#0 {main} + thrown in %sh15903.php on line 4