From: Dmitry Stogov Date: Thu, 28 May 2020 15:35:32 +0000 (+0300) Subject: Fixed tracing JIT type inference for passing undefined CV by value X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=784f1b5c490fd99d286abf8ce5c673a8b92639a3;p=php Fixed tracing JIT type inference for passing undefined CV by value --- diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 41409dd953..fd692b5ebc 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -3125,6 +3125,9 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par if (opline->op1_type == IS_CONST) { zend_jit_trace_send_type(opline, frame->call, Z_TYPE_P(RT_CONSTANT(opline, opline->op1))); } else if (op1_type != IS_UNKNOWN) { + if (op1_type == IS_UNDEF) { + op1_type = IS_NULL; + } zend_jit_trace_send_type(opline, frame->call, op1_type); } } @@ -3169,6 +3172,9 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par goto done; } if (op1_type != IS_UNKNOWN) { + if (op1_type == IS_UNDEF) { + op1_type = IS_NULL; + } zend_jit_trace_send_type(opline, frame->call, op1_type); } }