[php-src] PR #23054: Fix GH-22206: avoid musttail in zend_runtime_jit() in the tail-call VM
| From: | lazerg | Date: | Wed, 05 Aug 2026 01:07:47 +0000 |
| Subject: | [php-src] PR #23054: Fix GH-22206: avoid musttail in zend_runtime_jit() in the tail-call VM | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-37541@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/23054
Author: lazerg
With
--disable-gcc-global-regs and a compiler that supports preserve_none,
opcache is built with ZEND_VM_KIND_TAILCALL, where ZEND_OPCODE_RETURN()
expands to a guaranteed tail call. zend_runtime_jit() does its work inside
zend_try(), which uses setjmp(), and GCC 16 rejects that combination with
"cannot tail-call: caller uses setjmp".
GH-22320 fixed the --enable-gcc-global-regs side of the same report. Here the tail call
isn't needed: zend_runtime_jit() is a cold one-shot JIT trigger rather than a hot
VM handler, so a plain call works and the returned opline still goes back to the VM loop as before.
Checked with GCC 16.1.0: a --disable-gcc-global-regs build fails on
ext/opcache/jit/zend_jit.lo before the change and compiles after it. ext/opcache and
Zend tests pass on a tail-call VM build.
Fixes GH-22206