[php-src] master: Zend: only require FCI to be initialized if it is needed (#24151)
| From: | Gina Peter Banyard via GitHub | Date: | Sun, 22 Nov 2026 19:56:04 +0000 |
| Subject: | [php-src] master: Zend: only require FCI to be initialized if it is needed (#24151) | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-144044@lists.php.net to get a copy of this message | ||
Author: Gina Peter Banyard (Girgias)
Committer: GitHub (web-flow)
Pusher: Girgias
Date: 2026-11-22T19:56:01Z
Commit: https://github.com/php/php-src/commit/41d5b790da6a65e2650d027a9537fcef32255a9b
Raw diff: https://github.com/php/php-src/commit/41d5b790da6a65e2650d027a9537fcef32255a9b.diff
Zend: only require FCI to be initialized if it is needed (#24151)
A fully initialized FCC is sufficient to call a function.
This is also a precondition on refactoring the FCI structure to be able to get rid of the useless
size field.
Changed paths:
M Zend/zend_execute_API.c
Diff:
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 94273a4bc59f..a56bc53725bd 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -858,9 +858,8 @@ zend_result zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_
return SUCCESS; /* we would result in an unstable executor otherwise */
}
- ZEND_ASSERT(ZEND_FCI_INITIALIZED(*fci));
-
- if (!fci_cache || !fci_cache->function_handler) {
+ if (!fci_cache || !ZEND_FCC_INITIALIZED(*fci_cache)) {
+ ZEND_ASSERT(ZEND_FCI_INITIALIZED(*fci) && "Initialized FCI is required if FCC is not
initialized");
char *error = NULL;
if (!fci_cache) {