Skip to content

Commit b3cdc4a

Browse files
committed
fix ZEND_VM_SET_OPCODE and patch *call opcodes instead
1 parent 5e379ad commit b3cdc4a

File tree

3 files changed

+26
-13
lines changed

3 files changed

+26
-13
lines changed

Zend/zend_execute.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5508,7 +5508,8 @@ static zend_always_inline zend_execute_data *_zend_vm_stack_push_call_frame(uint
55085508

55095509
#define ZEND_VM_SET_OPCODE(new_op) \
55105510
CHECK_SYMBOL_TABLES() \
5511-
OPLINE = new_op;
5511+
OPLINE = new_op; \
5512+
ZEND_VM_INTERRUPT_CHECK()
55125513

55135514
#define ZEND_VM_SET_RELATIVE_OPCODE(opline, offset) \
55145515
ZEND_VM_SET_OPCODE(ZEND_OFFSET_TO_OPLINE(opline, offset))

Zend/zend_vm_def.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4038,7 +4038,8 @@ ZEND_VM_HOT_HANDLER(129, ZEND_DO_ICALL, ANY, ANY, SPEC(RETVAL,OBSERVER))
40384038
HANDLE_EXCEPTION();
40394039
}
40404040

4041-
ZEND_VM_SET_OPCODE(opline + 1);
4041+
CHECK_SYMBOL_TABLES()
4042+
OPLINE = opline + 1;
40424043
ZEND_VM_CONTINUE();
40434044
}
40444045

@@ -4167,7 +4168,8 @@ ZEND_VM_C_LABEL(fcall_by_name_end):
41674168
zend_rethrow_exception(execute_data);
41684169
HANDLE_EXCEPTION();
41694170
}
4170-
ZEND_VM_SET_OPCODE(opline + 1);
4171+
CHECK_SYMBOL_TABLES()
4172+
OPLINE = opline + 1;
41714173
ZEND_VM_CONTINUE();
41724174
}
41734175

@@ -4287,7 +4289,8 @@ ZEND_VM_C_LABEL(fcall_end):
42874289
HANDLE_EXCEPTION();
42884290
}
42894291

4290-
ZEND_VM_SET_OPCODE(opline + 1);
4292+
CHECK_SYMBOL_TABLES()
4293+
OPLINE = opline + 1;
42914294
ZEND_VM_CONTINUE();
42924295
}
42934296

Zend/zend_vm_execute.h

Lines changed: 18 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)