Fix cDAC dump tests on 32-bit ARM targets#125841
Merged
max-charlamb merged 1 commit intomainfrom Mar 20, 2026
Merged
Conversation
ClrMdDumpHost: Mask export addresses to 32-bit on 32-bit targets. ClrMD's GetExportSymbolAddress() returns addresses with spurious upper bits on ARM32 ELF modules, causing all dump tests to fail with 'Failed to create ContractDescriptorTarget'. See microsoft/clrmd#1407 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the cDAC dump-test hosting logic to work around a ClrMD symbol-resolution bug that returns corrupted export addresses for 32-bit ELF modules (notably linux-arm32), causing dump-based tests to fail.
Changes:
- Mask the export symbol address to 32 bits when the target pointer size is 4, preventing invalid out-of-range addresses on 32-bit targets.
- Add an inline comment explaining the ClrMD issue and linking the upstream tracking bug.
hoyosjs
approved these changes
Mar 20, 2026
max-charlamb
added a commit
that referenced
this pull request
Mar 25, 2026
Adds 32-bit platform coverage to the cDAC dump test Helix infrastructure: - **windows\_x86**: Runs on `Windows.11.Amd64.Client.Open` via WoW64 (same queue as x64) - **linux\_arm**: Runs on containerized ARM32 Helix queue (`helix_linux_arm32_oldest` — Debian on ARM64 hardware) Depends on #125841 which fixes cDAC dump tests on 32-bit ARM targets. ### Changes - `eng/pipelines/cdac/prepare-cdac-helix-steps.yml`: Added queue switch cases for `windows_x86` and `linux_arm` - `eng/pipelines/runtime-diagnostics.yml`: Added `linux_arm` and `windows_x86` to `cdacDumpPlatforms` defaults, publish dump artifacts on test failure - `src/native/managed/cdac/tests/DumpTests/EnableUnsignedDac.props`: Extracted shared unsigned DAC registry logic with WoW64 `/reg:32` support for x86 - `src/native/managed/cdac/tests/DumpTests/cdac-dump-helix.proj`: Preserve test exit code through tar command, import shared DAC props ### Testing CI validates all 6 platforms: windows\_x64, windows\_x86, windows\_arm64, linux\_x64, linux\_arm64, linux\_arm. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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
Work around a ClrMD bug (microsoft/clrmd#1407) that causes
ModuleInfo.GetExportSymbolAddress()to return corrupt addresses for 32-bit ELF modules, breaking all cDAC dump tests on ARM32.Problem
ClrMD's
ElfSymbol32struct declares itsValuefield asulong(8 bytes) instead ofuint(4 bytes), mismatching the ELF32 spec's 4-bytest_value. This causes the adjacentst_sizefield to leak into the upper 32 bits of the symbol value. For example, theDotNetRuntimeContractDescriptorexport (32 bytes,st_size = 0x20) produces:All memory reads at the returned address fail because it is outside the 32-bit address space.
Fix
Mask the address returned by
GetExportSymbolAddress()to 32 bits when the target pointer size is 4:This workaround can be removed once microsoft/clrmd#1407 is fixed upstream.
Validation