Commit 0c31be1
Fix zend_interrupt compilation for non-tailcall VM builds
The call_interrupt_op sentinel approach only applies to TAILCALL VM,
where musttail constraints prevent checking ZEND_VM_ENTER_BIT in
ZEND_VM_DISPATCH_TO_HELPER. For CALL VM (non-global-reg), zend_interrupt
now forwards directly to zend_interrupt_helper_SPEC instead of returning
&call_interrupt_op.
Guard zend_interrupt (function and forward declaration) with:
#if !(defined(ZEND_VM_FP_GLOBAL_REG) && defined(ZEND_VM_IP_GLOBAL_REG))
&& ZEND_VM_KIND != ZEND_VM_KIND_TAILCALL
This fixes three failure modes:
- Global-reg builds (HYBRID/CALL with FP+IP regs): ZEND_OPCODE_HANDLER_RET
is void, making return &call_interrupt_op a constraint violation
- CALL non-global-reg builds (x32, Windows): call_interrupt_op was
undeclared for non-TAILCALL VM kinds
- TAILCALL builds: zend_interrupt (CALL variant) compiled but unused,
triggering -Werror=unused-function
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 57d406a commit 0c31be1
2 files changed
Lines changed: 25 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1597 | 1597 | | |
1598 | 1598 | | |
1599 | 1599 | | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
1600 | 1604 | | |
1601 | 1605 | | |
1602 | 1606 | | |
1603 | 1607 | | |
1604 | 1608 | | |
1605 | | - | |
| 1609 | + | |
1606 | 1610 | | |
1607 | 1611 | | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
1608 | 1615 | | |
1609 | 1616 | | |
1610 | 1617 | | |
| |||
1860 | 1867 | | |
1861 | 1868 | | |
1862 | 1869 | | |
1863 | | - | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
1864 | 1875 | | |
1865 | 1876 | | |
1866 | 1877 | | |
| |||
2056 | 2067 | | |
2057 | 2068 | | |
2058 | 2069 | | |
| 2070 | + | |
2059 | 2071 | | |
| 2072 | + | |
2060 | 2073 | | |
2061 | 2074 | | |
2062 | 2075 | | |
| |||
0 commit comments