@@ -12443,6 +12443,11 @@ static int zend_jit_ffi_fetch_dim_read(zend_jit_ctx *jit,
12443
12443
12444
12444
ir_ref obj_ref = jit_Z_PTR(jit, op1_addr);
12445
12445
ir_ref cdata_ref = ir_LOAD_A(ir_ADD_OFFSET(obj_ref, offsetof(zend_ffi_cdata, ptr)));
12446
+
12447
+ if (op1_ffi_type->kind == ZEND_FFI_TYPE_POINTER) {
12448
+ cdata_ref = ir_LOAD_A(cdata_ref);
12449
+ }
12450
+
12446
12451
ir_ref ptr = ir_ADD_A(cdata_ref, ir_MUL_L(jit_Z_LVAL(jit, op2_addr), ir_CONST_LONG(el_type->size)));
12447
12452
12448
12453
switch (el_type->kind) {
@@ -13181,6 +13186,11 @@ static int zend_jit_ffi_assign_dim(zend_jit_ctx *jit,
13181
13186
13182
13187
ir_ref obj_ref = jit_Z_PTR(jit, op1_addr);
13183
13188
ir_ref cdata_ref = ir_LOAD_A(ir_ADD_OFFSET(obj_ref, offsetof(zend_ffi_cdata, ptr)));
13189
+
13190
+ if (op1_ffi_type->kind == ZEND_FFI_TYPE_POINTER) {
13191
+ cdata_ref = ir_LOAD_A(cdata_ref);
13192
+ }
13193
+
13184
13194
ir_ref ptr = ir_ADD_A(cdata_ref, ir_MUL_L(jit_Z_LVAL(jit, op2_addr), ir_CONST_LONG(el_type->size)));
13185
13195
13186
13196
ZEND_ASSERT(!res_addr);
@@ -13644,6 +13654,11 @@ static int zend_jit_ffi_assign_dim_op(zend_jit_ctx *jit,
13644
13654
13645
13655
ir_ref obj_ref = jit_Z_PTR(jit, op1_addr);
13646
13656
ir_ref cdata_ref = ir_LOAD_A(ir_ADD_OFFSET(obj_ref, offsetof(zend_ffi_cdata, ptr)));
13657
+
13658
+ if (op1_ffi_type->kind == ZEND_FFI_TYPE_POINTER) {
13659
+ cdata_ref = ir_LOAD_A(cdata_ref);
13660
+ }
13661
+
13647
13662
ir_ref ptr = ir_ADD_A(cdata_ref, ir_MUL_L(jit_Z_LVAL(jit, op2_addr), ir_CONST_LONG(el_type->size)));
13648
13663
13649
13664
if (!zend_jit_ffi_assign_op_helper(jit, opline, opline->extended_value,
0 commit comments