Skip to content

Instantly share code, notes, and snippets.

@dstogov
Created August 19, 2020 07:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dstogov/2a6edb668de93dce3a7bcbecc10a8c3d to your computer and use it in GitHub Desktop.
Save dstogov/2a6edb668de93dce3a7bcbecc10a8c3d to your computer and use it in GitHub Desktop.
diff --git a/reserved_slot.c b/reserved_slot.c
index 4e418f9..fdc6574 100644
--- a/reserved_slot.c
+++ b/reserved_slot.c
@@ -45,7 +45,8 @@ void reserved_slot_startup_fcall_begin_handler(zend_execute_data *ex) {
if (fbc->common.fn_flags & ZEND_ACC_IMMUTABLE) {
php_printf("Function %s is immutable\n", ZSTR_VAL(fbc->common.function_name));
}
- if (fbc->type == ZEND_USER_FUNCTION) {
+ if (fbc->type == ZEND_USER_FUNCTION
+ && !(fbc->op_array.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)) {
reserved_slot_cache cache = {
.ptr = ZEND_OP_ARRAY_EXTENSION(&fbc->op_array, reserved_slot_resource),
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment