Skip to content

Commit 0bb146f

Browse files
authored
Make the call VM read the opline back after interrupts (#19890)
This happened implicitly in the past due to EX(opline) being used - or in the hybrid VM case, the implicit LOAD_OPLINE() happening as part of ZEND_VM_ENTER(). With 76d7c61 opline is used standalone and the return value of zend_interrupt_helper_SPEC ignored. Make use of it... Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
1 parent 41538c9 commit 0bb146f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Zend/zend_vm_execute.h

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

Zend/zend_vm_gen.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2025,7 +2025,11 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
20252025
out($f,"# define ZEND_VM_LEAVE() return (zend_op*)((uintptr_t)opline | ZEND_VM_ENTER_BIT)\n");
20262026
out($f,"#endif\n");
20272027
out($f,"#define ZEND_VM_INTERRUPT() ZEND_VM_TAIL_CALL(zend_interrupt_helper".($spec?"_SPEC":"")."(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));\n");
2028+
out($f,"#ifdef ZEND_VM_FP_GLOBAL_REG\n");
20282029
out($f,"#define ZEND_VM_LOOP_INTERRUPT() zend_interrupt_helper".($spec?"_SPEC":"")."(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);\n");
2030+
out($f,"#else\n");
2031+
out($f,"#define ZEND_VM_LOOP_INTERRUPT() opline = (zend_op*)((uintptr_t)zend_interrupt_helper".($spec?"_SPEC":"")."(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU) & ~ZEND_VM_ENTER_BIT);\n");
2032+
out($f,"#endif\n");
20292033
if ($kind == ZEND_VM_KIND_HYBRID) {
20302034
out($f,"#define ZEND_VM_DISPATCH(opcode, opline) return zend_vm_get_opcode_handler_func(opcode, opline)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);\n");
20312035
} else {

0 commit comments

Comments
 (0)