Fix PEAssembly layout in native DAC builds - #135101
Merged
hoyosjs merged 1 commit intoOct 2, 2026
Merged
Conversation
Use PROFILING_SUPPORTED_DATA for profiler-related instance fields so native DAC and runtime builds retain the same PEAssembly layout. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 593f81fe-227d-480b-9da0-38ddeea24fd9
Member
Author
|
/azp run runtime-diagnostics |
|
No pipelines are associated with this pull request. |
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 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: @steveisok, @tommcdon, @dotnet/dotnet-diag |
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. |
jkotas
approved these changes
Oct 2, 2026
Member
Author
|
/ba-g unblock CI |
max-charlamb
enabled auto-merge (squash)
October 2, 2026 16:15
max-charlamb
disabled auto-merge
October 2, 2026 16:33
Member
Author
|
/ba-g unblocking CI |
max-charlamb
enabled auto-merge (squash)
October 2, 2026 16:34
max-charlamb
disabled auto-merge
October 2, 2026 16:38
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.
Summary
Use
PROFILING_SUPPORTED_DATAinstead ofPROFILING_SUPPORTEDto guard thePEAssembly::m_pImporterandm_pEmitterinstance fields.#134875 made these fields conditional on
PROFILING_SUPPORTED, which is not defined in native DAC builds. This shifted the DAC's view of subsequent fields, includingm_pAssemblyBinder, and causeddumpalcto reportFailed to get the AssemblyLoadContext.PROFILING_SUPPORTED_DATAis defined for both the profiling-enabled runtime and its DAC, preserving their matching layouts without enabling profiler functionality in the DAC.Validation
.\build.cmd -subset clr.runtime -c Releasesucceeded with zero warnings or errors.dumpalcreproducedFailed to get the AssemblyLoadContext.mscordaccore.dllwith the fixed DAC and analyzed the same dump with the same SOS.dumpalcreturnedName: System.Runtime.Loader.DefaultAssemblyLoadContext.Resolves #135075
Note
This PR description and fix were prepared with GitHub Copilot.