Skip to content

Commit c0d1dbc

Browse files
committed
Fixed incorrect TRACE_FRAME_MASK_NESTED flag setting
1 parent c8df28d commit c0d1dbc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ext/opcache/jit/zend_jit_trace.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3460,6 +3460,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
34603460
const zend_op *opline, *orig_opline;
34613461
const zend_ssa_op *ssa_op, *orig_ssa_op;
34623462
int used_stack;
3463+
uint32_t frame_flags = 0;
34633464

34643465
JIT_G(current_trace) = trace_buffer;
34653466

@@ -3749,6 +3750,8 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
37493750
p++;
37503751
}
37513752

3753+
frame_flags = 0;
3754+
37523755
switch (opline->opcode) {
37533756
case ZEND_INIT_FCALL:
37543757
case ZEND_INIT_FCALL_BY_NAME:
@@ -4513,6 +4516,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
45134516
case ZEND_INIT_FCALL:
45144517
case ZEND_INIT_FCALL_BY_NAME:
45154518
case ZEND_INIT_NS_FCALL_BY_NAME:
4519+
frame_flags = TRACE_FRAME_MASK_NESTED;
45164520
if (!zend_jit_init_fcall(&dasm_state, opline, op_array_ssa->cfg.map ? op_array_ssa->cfg.map[opline - op_array->opcodes] : -1, op_array, ssa, ssa_op, frame->call_level, p + 1, used_stack < 0)) {
45174521
goto jit_failure;
45184522
}
@@ -5491,6 +5495,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
54915495
delayed_fetch_this = ssa->var_info[ssa_op->op1_use].delayed_fetch_this;
54925496
}
54935497
}
5498+
frame_flags = TRACE_FRAME_MASK_NESTED;
54945499
if (!zend_jit_init_method_call(&dasm_state, opline,
54955500
op_array_ssa->cfg.map ? op_array_ssa->cfg.map[opline - op_array->opcodes] : -1,
54965501
op_array, ssa, ssa_op, frame->call_level,
@@ -5505,6 +5510,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
55055510
}
55065511
op2_info = OP2_INFO();
55075512
CHECK_OP2_TRACE_TYPE();
5513+
frame_flags = TRACE_FRAME_MASK_NESTED;
55085514
if (!zend_jit_init_closure_call(&dasm_state, opline, op_array_ssa->cfg.map ? op_array_ssa->cfg.map[opline - op_array->opcodes] : -1, op_array, ssa, ssa_op, frame->call_level, p + 1, used_stack < 0)) {
55095515
goto jit_failure;
55105516
}
@@ -5946,7 +5952,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
59465952
}
59475953

59485954
call = top;
5949-
TRACE_FRAME_INIT(call, p->func, TRACE_FRAME_MASK_NESTED, num_args);
5955+
TRACE_FRAME_INIT(call, p->func, frame_flags, num_args);
59505956
call->prev = frame->call;
59515957
if (!(p->info & ZEND_JIT_TRACE_FAKE_INIT_CALL)) {
59525958
TRACE_FRAME_SET_LAST_SEND_BY_VAL(call);

0 commit comments

Comments
 (0)