You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can only review this in the evening, but can you please explain the analysis and reasoning in the PR so I don't have to fully reconstruct it?
Sure. When a call in the trace throws, the JIT code leaves through jit_stub_exception_handler to the VM's HANDLE_EXCEPTION, and the catch runs in the interpreter, reading CVs from the frame. Unlike a side exit, that path has no snapshot, so register-only CVs are never written back: the catch sees UNDEF ($n in GH-24445) or a stale value ($s in GH-24798). Hence 1054 being fine.
The fix sets ZREG_STORE on CVs of op_arrays with try/catch in zend_jit_trace_allocate_registers(), so defs also reach the frame. ZREG_LOAD ranges are skipped as their slot is already in sync, and functions without try/catch are unaffected.
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
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.
Should also fix GH-24798