1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Avoid allocating temporaries on the call frame for property hook trampolines (#16287)

As pointed out in https://github.com/php/php-src/pull/16252#issuecomment-2396745309
This commit is contained in:
Niels Dossche
2025-03-25 20:49:27 +01:00
committed by GitHub
parent 5c3cff2f25
commit 7acce8a724

View File

@@ -1731,6 +1731,9 @@ ZEND_API zend_function *zend_get_property_hook_trampoline(
func = (zend_function *)(uintptr_t)ecalloc(1, sizeof(zend_internal_function));
}
func->type = ZEND_INTERNAL_FUNCTION;
/* This trampoline does not use the call_trampoline_op, so it won't reuse the call frame,
* which means we don't even need to reserve a temporary for observers. */
func->common.T = 0;
func->common.arg_flags[0] = 0;
func->common.arg_flags[1] = 0;
func->common.arg_flags[2] = 0;