Skip to content

Commit 50d7797

Browse files
committed
clenup trampoline by zend_jit_free_trampoline()
1 parent cb77441 commit 50d7797

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

ext/opcache/jit/zend_jit_ir.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8431,13 +8431,21 @@ static int zend_jit_push_call_frame(zend_jit_ctx *jit, const zend_op *opline, co
84318431
used_stack_ref);
84328432

84338433
if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE) {
8434-
int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
8434+
bool may_be_trampoline = !func && (opline->opcode == ZEND_INIT_METHOD_CALL);
8435+
int32_t exit_point = zend_jit_trace_get_exit_point(opline,
8436+
may_be_trampoline ?
8437+
(ZEND_JIT_EXIT_TO_VM | ZEND_JIT_EXIT_METHOD_CALL) : ZEND_JIT_EXIT_TO_VM);
84358438
const void *exit_addr = zend_jit_trace_get_exit_addr(exit_point);
84368439

84378440
if (!exit_addr) {
84388441
return 0;
84398442
}
84408443

8444+
if (may_be_trampoline) {
8445+
jit->trace->exit_info[exit_point].poly_func_ref = func_ref;
8446+
jit->trace->exit_info[exit_point].poly_this_ref = this_ref;
8447+
}
8448+
84418449
ir_GUARD(ref, ir_CONST_ADDR(exit_addr));
84428450
} else {
84438451
if_enough_stack = ir_IF(ref);

0 commit comments

Comments
 (0)