[php-src] PR #25182: Fix GH-25165: Tracing JIT spins once the JIT buffer is full
| From: | iliaal | Date: | Wed, 04 Nov 2026 01:22:21 +0000 |
| Subject: | [php-src] PR #25182: Fix GH-25165: Tracing JIT spins once the JIT buffer is full | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-40282@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25182
Author: iliaal
Once the JIT buffer is full,
zend_jit_blacklist_trace_exit() marks a side exit
blacklisted even though it could not emit the exit stub, so the exit stays unlinked and every later
hit returned 0 from zend_jit_trace_exit(). When that exit's opline is the root
trace's start, resuming there re-enters the same trace and the process spins at 100% CPU.
Returning 1 in that case runs the original handler, the same guard zend_jit_trace_exit_to_vm()
applies when it can emit a stub.
The commit also backports dstogov/ir#295, which frees the DynASM state when the code buffer is full;
without it, debug builds report a leak in the new test. Reproduced on PHP-8.4 and master debug
builds, hybrid and CALL VM.
Fixes GH-25165