Skip to content

Skip cross-bitness cDAC dump tests until ClrMD supports it#127118

Merged
max-charlamb merged 1 commit intodotnet:mainfrom
max-charlamb:fix/skip-cross-bitness-dump-tests
Apr 19, 2026
Merged

Skip cross-bitness cDAC dump tests until ClrMD supports it#127118
max-charlamb merged 1 commit intodotnet:mainfrom
max-charlamb:fix/skip-cross-bitness-dump-tests

Conversation

@max-charlamb
Copy link
Copy Markdown
Member

Summary

Skip cDAC dump tests when the host pointer size doesn't match the dump's architecture (e.g., 32-bit host reading 64-bit dumps). Cross-bitness dump reading is not yet supported by ClrMD due to ClrDataAddress truncation issues being fixed in microsoft/clrmd#1423.

Changes

  • DumpTestBase.cs: Added cross-bitness check in EvaluateSkipAttributes. When IntPtr.Size doesn't match the dump architecture from dump-info.json, the test is skipped with a clear message referencing the upstream fix.

Impact

This prevents confusing test failures on x86 Helix legs when they attempt to load x64 dumps (and vice versa). Once microsoft/clrmd#1423 is merged and the ClrMD package is updated, this skip can be removed.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Skips cDAC dump integration tests when the test host’s pointer size differs from the dump’s architecture (cross-bitness), avoiding known ClrMD limitations related to ClrDataAddress truncation.

Changes:

  • Added a cross-bitness check in DumpTestBase.EvaluateSkipAttributes using dump-info.json architecture metadata.
  • Throws SkipTestException with an explanatory message referencing the upstream ClrMD issue.

Comment thread src/native/managed/cdac/tests/DumpTests/DumpTestBase.cs Outdated
Reading 64-bit dumps from a 32-bit host is not yet supported by ClrMD
due to ClrDataAddress truncation issues (microsoft/clrmd#1423). Skip
these tests with a clear message instead of letting them fail.

The reverse (64-bit host reading 32-bit dumps) works fine and is not
skipped.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@max-charlamb max-charlamb force-pushed the fix/skip-cross-bitness-dump-tests branch from 3b15904 to 4f7b9fc Compare April 19, 2026 14:15
@max-charlamb max-charlamb merged commit 0bb3076 into dotnet:main Apr 19, 2026
62 checks passed
@max-charlamb max-charlamb deleted the fix/skip-cross-bitness-dump-tests branch April 19, 2026 17:20
max-charlamb pushed a commit that referenced this pull request Apr 27, 2026
Update ClrMD to the first stable release with cross-bitness address
truncation fixes (microsoft/clrmd#1423). This version correctly handles
sign-extended CLRDATA_ADDRESS values on 32-bit targets, enabling
32-bit hosts to read 64-bit dumps.

Remove the cross-bitness dump test skip added in #127118 — ClrMD now
supports this scenario.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
max-charlamb added a commit that referenced this pull request Apr 28, 2026
Update ClrMD to the first stable release with cross-bitness address
truncation fixes
([microsoft/clrmd#1423](microsoft/clrmd#1423)).

## Changes

- **`eng/Versions.props`**: Update `MicrosoftDiagnosticsRuntimeVersion`
from `4.0.0-beta.26210.1` to `4.0.722401` (stable release)
- **`DumpTestBase.cs`**: Remove the cross-bitness dump test skip added
in #127118 — ClrMD 4.0.722401 now correctly handles sign-extended
`CLRDATA_ADDRESS` values, enabling 32-bit hosts to read 64-bit dumps

## What was fixed in ClrMD

ClrMD 4.0.722401 includes:
- `ClrDataAddress` type with explicit sign-extension handling
(`FromTargetAddress` / `ToAddress`)
- ABI-safe COM vtable marshalling (addresses as `ulong` primitives, not
structs)
- `unchecked` casts to prevent `OverflowException` on sign-extended
32-bit addresses
- Full verification against `sospriv.idl` in dotnet/runtime

## Cross-platform verification

xplat cDAC dump tests pass with the skip removed:

https://dev.azure.com/dnceng-public/public/_build/results?buildId=1398682&view=ms.vss-test-web.build-test-results-tab

Co-authored-by: Max Charlamb <maxcharlamb@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants