Re-enable assert for R2R PE mapping failure on OSX - #130638
#130638Merged
elinor-fung merged 4 commits intoJul 17, 2026
maindotnet/runtime:mainfrom
copilot/reenable-assert-osxdotnet/runtime:copilot/reenable-assert-osxCopy head branch name to clipboard
Merged
Re-enable assert for R2R PE mapping failure on OSX#130638elinor-fung merged 4 commits intomaindotnet/runtime:mainfrom copilot/reenable-assert-osxdotnet/runtime:copilot/reenable-assert-osxCopy head branch name to clipboard
elinor-fung merged 4 commits into
maindotnet/runtime:mainfrom
copilot/reenable-assert-osxdotnet/runtime:copilot/reenable-assert-osxCopy head branch name to clipboard
Conversation
Co-authored-by: elinor-fung <47805090+elinor-fung@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Reenable assert for R2R PE mapping failure on OSX
Re-enable assert for R2R PE mapping failure on OSX
Jul 13, 2026
Open
3 tasks
elinor-fung
marked this pull request as ready for review
July 17, 2026 00:29
|
Azure Pipelines: Successfully started running 3 pipeline(s). 12 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
There was a problem hiding this comment.
Pull request overview
This PR re-enables a CoreCLR VM debug assertion intended to catch suspicious ReadyToRun (R2R) PE mapping failures on Unix platforms, extending it to macOS and refining the predicate to account for cases where R2R isn’t permitted for the image.
Changes:
- Switch the assertion guard from
TARGET_LINUXtoTARGET_UNIXto include macOS. - Refine the
_ASSERTEcondition to exempt cases whereAllowR2RForImage(pOwner)is false (even if an R2R header is present).
Show a summary per file
| File | Description |
|---|---|
| src/coreclr/vm/peimagelayout.cpp | Re-enables and refines a Unix-only debug assert around R2R mapping/conversion behavior. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 1
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
elinor-fung
temporarily deployed
to
copilot-pat-pool
July 17, 2026 00:41 — with
GitHub Actions
Inactive
elinor-fung
temporarily deployed
to
copilot-pat-pool
July 17, 2026 00:42 — with
GitHub Actions
Inactive
elinor-fung
reviewed
Jul 17, 2026
elinor-fung
temporarily deployed
to
copilot-pat-pool
July 17, 2026 01:39 — with
GitHub Actions
Inactive
elinor-fung
temporarily deployed
to
copilot-pat-pool
July 17, 2026 01:39 — with
GitHub Actions
Inactive
AaronRobinsonMSFT
approved these changes
Jul 17, 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 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.
The assert detecting suspicious R2R PE mapping failures on Unix was temporarily disabled on OSX (PR #68845) while a fix propagated through SDK/published builds. That fix has since landed, so the assert can be re-enabled. Also update the condition to handle when R2R is not allowed for the image even if the header exists.
cc @dotnet/appmodel @AaronRobinsonMSFT