[php-src] master: Merge branch 'PHP-8.5'

From: Date: Sat, 19 Sep 2026 21:54:47 +0000
Subject: [php-src] master: Merge branch 'PHP-8.5'
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-141296@lists.php.net to get a copy of this message
Author: ndossche (ndossche) Date: 2026-09-19T23:53:59+02:00 Commit: https://github.com/php/php-src/commit/198ee90516ac38fd7fd82e86e35f70a5f734bb57 Raw diff: https://github.com/php/php-src/commit/198ee90516ac38fd7fd82e86e35f70a5f734bb57.diff Merge branch 'PHP-8.5' * PHP-8.5: 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 Zend/Optimizer/optimize_func_calls.c Diff: diff --git a/Zend/Optimizer/optimize_func_calls.c b/Zend/Optimizer/optimize_func_calls.c index 05cdce4fc4cf..0e6c5797c680 100644 --- a/Zend/Optimizer/optimize_func_calls.c +++ b/Zend/Optimizer/optimize_func_calls.c @@ -61,6 +61,8 @@ static void zend_delete_call_instructions(const zend_op_array *op_array, zend_op case ZEND_DO_ICALL: case ZEND_DO_UCALL: case ZEND_DO_FCALL_BY_NAME: + case ZEND_CALLABLE_CONVERT: + case ZEND_CALLABLE_CONVERT_PARTIAL: 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 (#141296) next »