diff options
author | Dmitry Stogov <dmitry@zend.com> | 2021-01-11 15:13:32 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2021-01-11 15:13:32 +0300 |
commit | c6b2b3b1b55ec586b92d6264ee4d809845f7217f (patch) | |
tree | 27a34ea80100d9b52d83d593b4f8cc3808475add | |
parent | d9e441be421dce0f2a66f61571445605c594f81f (diff) | |
parent | 35e0506a2e7ea586a56b51412ec120f7656a0d63 (diff) | |
download | php-git-c6b2b3b1b55ec586b92d6264ee4d809845f7217f.tar.gz |
Merge branch 'PHP-8.0'
* PHP-8.0:
Add guard if lvalue of assignment may be a reference, but wasn't a reference during recording
-rw-r--r-- | ext/opcache/jit/zend_jit_trace.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 0b4edb1092..853be7517a 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -1625,6 +1625,10 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin break; } ADD_OP2_TRACE_GUARD(); + if (op1_type != IS_UNKNOWN + && (tssa->var_info[tssa->ops[idx].op1_use].type & MAY_BE_REF)) { + ADD_OP1_TRACE_GUARD(); + } break; case ZEND_CAST: if (opline->extended_value != op1_type) { @@ -4506,6 +4510,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par op2_info = OP2_INFO(); CHECK_OP2_TRACE_TYPE(); op1_info = OP1_INFO(); + CHECK_OP1_TRACE_TYPE(); op1_def_info = OP1_DEF_INFO(); op1_addr = OP1_REG_ADDR(); op1_def_addr = OP1_DEF_REG_ADDR(); |