[php-src] PR #25886: Fix GH-24678: Sync live variables before trace-ending calls
| From: | aasul | Date: | Sat, 28 Nov 2026 22:52:53 +0000 |
| Subject: | [php-src] PR #25886: Fix GH-24678: Sync live variables before trace-ending calls | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-41173@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25886
Author: aasul
Description
a side trace can end at
DO_FCALL while a live variable is still held in a register.
when execution returns to the interpreter, the variable's VM slot may still be undefined.
this fixes the issue by syncing live register values and required CV types before the call can
switch execution frames. calls that continue into the callee are left unchanged.
also adds a PHPT regression test for GH-24678.
Testing
confirmed the regression test fails on unmodified PHP 8.5 and passes with the fix
JIT suite: 581 passed, 17 skipped, 0 failed
OPcache suite: 1,013 passed, 49 skipped, 1 expected failure, 0 failed
broader PHP suite: 12,442 passed; 5 failures reproduced on the unmodified baseline due to missing
extensions
original reproducer passes with and without register allocation
120/120 additional edge-case configurations passed
100 repeated runs of the original failing configuration passed, plus 20 after rebuilding
PHP 8.4 is also affected, but needs a slightly different fix and the inherited-register handling
from GH-24622.
release, ZTS and sanitizer builds haven't been completed.