Preserve full XMM registers in Windows VM wrapper#21976
Merged
shivammathur merged 1 commit intophp:PHP-8.4from May 7, 2026
Merged
Preserve full XMM registers in Windows VM wrapper#21976shivammathur merged 1 commit intophp:PHP-8.4from
shivammathur merged 1 commit intophp:PHP-8.4from
Conversation
f86cd83 to
bc2f3ed
Compare
shivammathur
added a commit
to shivammathur/php-src
that referenced
this pull request
May 7, 2026
* PHP-8.5: Preserve full XMM registers in Windows VM wrapper (php#21976)
prateekbhujel
pushed a commit
to prateekbhujel/php-src
that referenced
this pull request
May 7, 2026
* PHP-8.4: Preserve full XMM registers in Windows VM wrapper (php#21976)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We do PGO-optimized builds for Windows releases. In our builds CI, some recorded-error tests are failing on the master branch:
https://github.com/shivammathur/php-windows-builder/actions/runs/25329578176/job/74262237899#step:6:197
https://github.com/shivammathur/php-windows-builder/actions/runs/25329578176/job/74262237943#step:6:477
After checking the trace from the build,
orig_errors_bufinzend.cwas stored in XMM6 in the PGO build, but the Windows VM wrapper was only preserving half of the XMM registers when execution re-entered the VM:php-src/Zend/zend.c
Line 1581 in b5b2c5d
So the lower half was restored correctly, but the upper half, which contained the pointer to the recorded errors array, was lost. That left
EG(errors)in an invalid state with a non-zero size but a null errors pointer.This fixes the wrapper to save and restore the full XMM6-XMM15 registers.