Skip to content

Commit 7acce8a

Browse files
authored
Avoid allocating temporaries on the call frame for property hook trampolines (#16287)
As pointed out in #16252 (comment)
1 parent 5c3cff2 commit 7acce8a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Zend/zend_object_handlers.c

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

0 commit comments

Comments
 (0)