Skip to content

Commit 784f1b5

Browse files
committed
Fixed tracing JIT type inference for passing undefined CV by value
1 parent 0abe742 commit 784f1b5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ext/opcache/jit/zend_jit_trace.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3125,6 +3125,9 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
31253125
if (opline->op1_type == IS_CONST) {
31263126
zend_jit_trace_send_type(opline, frame->call, Z_TYPE_P(RT_CONSTANT(opline, opline->op1)));
31273127
} else if (op1_type != IS_UNKNOWN) {
3128+
if (op1_type == IS_UNDEF) {
3129+
op1_type = IS_NULL;
3130+
}
31283131
zend_jit_trace_send_type(opline, frame->call, op1_type);
31293132
}
31303133
}
@@ -3169,6 +3172,9 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
31693172
goto done;
31703173
}
31713174
if (op1_type != IS_UNKNOWN) {
3175+
if (op1_type == IS_UNDEF) {
3176+
op1_type = IS_NULL;
3177+
}
31723178
zend_jit_trace_send_type(opline, frame->call, op1_type);
31733179
}
31743180
}

0 commit comments

Comments
 (0)