From 8334703dd94dbd7c60128e0d7f0910b188d62db8 Mon Sep 17 00:00:00 2001 From: Weilin Du Date: Mon, 27 Jul 2026 00:00:35 +0800 Subject: [PATCH 1/2] CI: Fix writing-tests.rst format to pass doc rstfmt CI This fixes https://github.com/php/php-src/actions/runs/30206101130/job/89804320499?pr=22799 --- docs/source/miscellaneous/writing-tests.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/miscellaneous/writing-tests.rst b/docs/source/miscellaneous/writing-tests.rst index fb66db79e57c..7365267648a9 100644 --- a/docs/source/miscellaneous/writing-tests.rst +++ b/docs/source/miscellaneous/writing-tests.rst @@ -237,8 +237,8 @@ and not in the INI section. This is because of the order in which settings are c If a TZ environmental variable is found the INI setting will be ignored. -Tests that run, or only have matching EXPECT output, on 32bit platforms can use a SKIPIF -section like: +Tests that run, or only have matching EXPECT output, on 32bit platforms can use a SKIPIF section +like: .. code:: php From 7ad79be6550fba20df3d7cea0a5d9da79861c1f9 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Sun, 26 Jul 2026 18:10:28 +0200 Subject: [PATCH 2/2] Fix use-of-uninitialized-value ast->lineno Exposed after GH-22833. ast->kind in this context may refer to a ZEND_AST_ZVAL, for which accessing lineno is incorrect. lineno is stored in zval.u2 instead. Fixes OSS-Fuzz-539121135 --- Zend/tests/oss-fuzz-539121135.phpt | 12 ++++++++++++ Zend/zend_compile.c | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 Zend/tests/oss-fuzz-539121135.phpt diff --git a/Zend/tests/oss-fuzz-539121135.phpt b/Zend/tests/oss-fuzz-539121135.phpt new file mode 100644 index 000000000000..bf44d659cd7b --- /dev/null +++ b/Zend/tests/oss-fuzz-539121135.phpt @@ -0,0 +1,12 @@ +--TEST-- +OSS-Fuzz-539121135: Use-of-uninitialized-value ast->lineno +--FILE-- + +--EXPECTF-- +Fatal error: No code may exist outside of namespace {} in %s on line %d diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 450b192ac482..2466710f9cee 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -12215,7 +12215,7 @@ static void zend_compile_stmt(zend_ast *ast) /* {{{ */ return; } - CG(zend_lineno) = ast->lineno; + CG(zend_lineno) = zend_ast_get_lineno(ast); if ((CG(compiler_options) & ZEND_COMPILE_EXTENDED_STMT) && !zend_is_unticked_stmt(ast)) { zend_do_extended_stmt(NULL);