Commit 41d5b790da6 for php
commit 41d5b790da6a65e2650d027a9537fcef32255a9b
Author: Gina Peter Banyard <girgias@php.net>
Date: Sun Nov 22 19:56:01 2026 +0000
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.
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 94273a4bc59..a56bc53725b 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) {