Skip to content

Commit 0ccf4b9

Browse files
committed
Add symbols guard
1 parent 92b83ab commit 0ccf4b9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

ext/opcache/jit/zend_jit_ir.c

+13
Original file line numberDiff line numberDiff line change
@@ -10337,6 +10337,15 @@ static ir_ref jit_FFI_CDATA_PTR(zend_jit_ctx *jit, ir_ref obj_ref)
1033710337
return ir_LOAD_A(ir_ADD_OFFSET(obj_ref, offsetof(zend_ffi_cdata, ptr)));
1033810338
}
1033910339

10340+
static int zend_jit_ffi_symbols_guard(zend_jit_ctx *jit,
10341+
const zend_op *opline,
10342+
zend_ssa *ssa,
10343+
int use,
10344+
int def,
10345+
zend_jit_addr addr,
10346+
HashTable *ffi_symbols,
10347+
zend_jit_ffi_info *ffi_info);
10348+
1034010349
static int zend_jit_ffi_init_call_sym(zend_jit_ctx *jit,
1034110350
const zend_op *opline,
1034210351
const zend_op_array *op_array,
@@ -10350,6 +10359,10 @@ static int zend_jit_ffi_init_call_sym(zend_jit_ctx *jit,
1035010359
HashTable *op1_ffi_symbols,
1035110360
zend_jit_ffi_info *ffi_info)
1035210361
{
10362+
if (!zend_jit_ffi_symbols_guard(jit, opline, ssa, ssa_op->op1_use, -1, op1_addr, op1_ffi_symbols, ffi_info)) {
10363+
return 0;
10364+
}
10365+
1035310366
return 1;
1035410367
}
1035510368

0 commit comments

Comments
 (0)