[php-src] PHP-8.5: Merge branch 'PHP-8.4' into PHP-8.5

From: Date: Sat, 19 Sep 2026 21:54:47 +0000
Subject: [php-src] PHP-8.5: Merge branch 'PHP-8.4' into PHP-8.5
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-141294@lists.php.net to get a copy of this message
Author: ndossche (ndossche) Date: 2026-09-19T23:51:51+02:00 Commit: https://github.com/php/php-src/commit/c091db1346ec0cfdf180a357dfca58ab2b012dc5 Raw diff: https://github.com/php/php-src/commit/c091db1346ec0cfdf180a357dfca58ab2b012dc5.diff Merge branch 'PHP-8.4' into PHP-8.5 * PHP-8.4: Fix OSS-Fuzz #546798343: Heap-buffer-overflow in zend_delete_call_instructions with callable conversion Changed paths: A ext/opcache/tests/opt/oss_fuzz_546798343.phpt M NEWS M Zend/Optimizer/optimize_func_calls.c Diff: diff --git a/NEWS b/NEWS index 592c19bb1a98..39010ac77b12 100644 --- a/NEWS +++ b/NEWS @@ -38,6 +38,10 @@ PHP NEWS . Fixed bug GH-23106 (mb_strpos() reads past the end of a haystack ending in a truncated UTF-8 sequence). (Lazizbek Ergashev) +- Opcache: + . Fixed OSS-Fuzz #546798343 (Heap-buffer-overflow in optimizer with + FCCs and inlining). (ndossche) + - PDO: . Fixed PDOStatement::getColumnMeta() reading out of bounds for an invalid column index. (Ilia Alshanetsky) diff --git a/Zend/Optimizer/optimize_func_calls.c b/Zend/Optimizer/optimize_func_calls.c index 8b29f47c9497..ff530c02de75 100644 --- a/Zend/Optimizer/optimize_func_calls.c +++ b/Zend/Optimizer/optimize_func_calls.c @@ -63,6 +63,7 @@ static void zend_delete_call_instructions(zend_op_array *op_array, zend_op *opli case ZEND_DO_ICALL: case ZEND_DO_UCALL: case ZEND_DO_FCALL_BY_NAME: + case ZEND_CALLABLE_CONVERT: call++; break; case ZEND_SEND_VAL: diff --git a/ext/opcache/tests/opt/oss_fuzz_546798343.phpt b/ext/opcache/tests/opt/oss_fuzz_546798343.phpt new file mode 100644 index 000000000000..f7f058a11652 --- /dev/null +++ b/ext/opcache/tests/opt/oss_fuzz_546798343.phpt @@ -0,0 +1,19 @@ +--TEST-- +OSS-Fuzz #546798343 (Heap-buffer-overflow in zend_delete_call_instructions with callable conversion) +--EXTENSIONS-- +opcache +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +--FILE-- +<?php + +$x = function() {}; +gonnaBeInlined($x(...)); +function gonnaBeInlined($foo) { +} + +echo "Done"; +?> +--EXPECT-- +Done

« previous php.cvs (#141294) next »