Repository navigation
Guard stale VN store in unused GetType extraction - #133485
Merged
Merged
Conversation
Co-authored-by: jakobbotsch <[email protected]>
Copilot
AI
changed the title
Guard value-number store during unused GetType extraction
Guard stale VN store in unused GetType extraction
Sep 9, 2026
|
Azure Pipelines: Successfully started running 5 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
jakobbotsch
approved these changes
Sep 9, 2026
jakobbotsch
marked this pull request as ready for review
September 9, 2026 11:34
|
Azure Pipelines: Successfully started running 5 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The change is minimal, matches existing vnStore-guarding patterns nearby, and removes a concrete null-dereference hazard without altering behavior when VN data is available.
Pull request overview
This PR updates a JIT-side side-effect extraction path to avoid dereferencing a stale/null vnStore when converting an unused Object.GetType intrinsic into a NULLCHECK, while still preserving the original node’s exception VN information when value numbering is available.
Changes:
- Add a
vnStore != nullptrguard before re-materializing the replacement node’sgtVNPairviaVNPWithExc.
File summaries
| File | Description |
|---|---|
| src/coreclr/jit/gentree.cpp | Avoids vnStore dereference when value numbering has been discarded during unused GetType → NULLCHECK conversion. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
EgorBo
approved these changes
Sep 9, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Avoid dereferencing
vnStorewhen value numbering has been discarded while extracting side effects from an unusedObject.GetTypenode.vnStore != nullptr.