Skip to content

Commit 914efeb

Browse files
committed
Fix tailcall helper dispatch after VM interrupt
1 parent 7c26c21 commit 914efeb

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

Zend/zend_vm_execute.h

Lines changed: 3 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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2136,6 +2136,9 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
21362136
out($f,"# define ZEND_VM_DISPATCH_TO_HELPER(call) \\\n");
21372137
out($f," do { \\\n");
21382138
out($f," opline = call; \\\n");
2139+
out($f," if (UNEXPECTED(((uintptr_t)opline & ZEND_VM_ENTER_BIT))) { \\\n");
2140+
out($f," return opline; \\\n");
2141+
out($f," } \\\n");
21392142
out($f," ZEND_VM_TAIL_CALL(opline->handler(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)); \\\n");
21402143
out($f," } while (0)\n");
21412144
out($f,"# define ZEND_VM_DISPATCH_TO_LEAVE_HELPER(helper) opline = &call_leave_op; SAVE_OPLINE(); ZEND_VM_CONTINUE()\n");

0 commit comments

Comments
 (0)