Skip to content

Commit 6110b33

Browse files
committed
Avoid modification of "const" CData
1 parent 4116e51 commit 6110b33

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ext/opcache/jit/zend_jit_trace.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6461,6 +6461,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
64616461
Z_STR_P(RT_CONSTANT(opline, opline->op2)));
64626462

64636463
if (field
6464+
&& (!field->is_const || opline->opcode != ZEND_FETCH_OBJ_W)
64646465
&& !field->bits
64656466
&& ZEND_FFI_TYPE(field->type)->kind != ZEND_FFI_TYPE_VOID
64666467
&& zend_jit_ffi_supported_type(ZEND_FFI_TYPE(field->type))) {
@@ -6492,10 +6493,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
64926493
goto jit_failure;
64936494
}
64946495
goto done;
6495-
} else if ((opline->opcode == ZEND_FETCH_OBJ_R
6496-
|| opline->opcode == ZEND_FETCH_OBJ_FUNC_ARG
6497-
|| opline->opcode == ZEND_FETCH_OBJ_W)
6498-
&& op1_ffi_symbols) {
6496+
} else if (op1_ffi_symbols) {
64996497
zend_ffi_symbol *sym = zend_hash_find_ptr(op1_ffi_symbols,
65006498
Z_STR_P(RT_CONSTANT(opline, opline->op2)));
65016499
if (sym

0 commit comments

Comments
 (0)