From 914f9ad49be800e887b4c5df637ff9af02eb5eeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 29 Aug 2025 19:58:44 +0200 Subject: [PATCH] Optimizer/zend_dump: Fix printing of the exception table (#19634) A newline was missing for finally blocks. --- Zend/Optimizer/zend_dump.c | 2 +- ext/opcache/tests/opt/gh18107_1.phpt | 1 + ext/opcache/tests/opt/gh18107_2.phpt | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Zend/Optimizer/zend_dump.c b/Zend/Optimizer/zend_dump.c index 4e46b38a8eb..64deb7085ed 100644 --- a/Zend/Optimizer/zend_dump.c +++ b/Zend/Optimizer/zend_dump.c @@ -1164,7 +1164,7 @@ ZEND_API void zend_dump_op_array(const zend_op_array *op_array, uint32_t dump_fl } if (op_array->try_catch_array[i].finally_end) { fprintf(stderr, - ", %04u", + ", %04u\n", op_array->try_catch_array[i].finally_end); } else { fprintf(stderr, ", -\n"); diff --git a/ext/opcache/tests/opt/gh18107_1.phpt b/ext/opcache/tests/opt/gh18107_1.phpt index c99fa7efa40..fea270a4d5a 100644 --- a/ext/opcache/tests/opt/gh18107_1.phpt +++ b/ext/opcache/tests/opt/gh18107_1.phpt @@ -41,6 +41,7 @@ $_main: 0011 FAST_RET T5 EXCEPTION TABLE: 0006, -, 0007, 0011 + Fatal error: Uncaught Exception: Should happen in %s:%d Stack trace: #0 {main} diff --git a/ext/opcache/tests/opt/gh18107_2.phpt b/ext/opcache/tests/opt/gh18107_2.phpt index 573bcd5ae4a..aaf58b4f820 100644 --- a/ext/opcache/tests/opt/gh18107_2.phpt +++ b/ext/opcache/tests/opt/gh18107_2.phpt @@ -48,6 +48,7 @@ $_main: 0015 RETURN int(1) EXCEPTION TABLE: 0006, 0006, 0010, 0014 + Fatal error: Uncaught Exception: Should happen in %s:%d Stack trace: #0 {main}