From 4f7b9fcd1e26ce7ea650cb6981dbb8948ef6daf7 Mon Sep 17 00:00:00 2001 From: Max Charlamb Date: Sun, 19 Apr 2026 09:42:47 -0400 Subject: [PATCH] Skip 64-bit dump tests on 32-bit hosts until ClrMD supports it 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> --- .../managed/cdac/tests/DumpTests/DumpTestBase.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/native/managed/cdac/tests/DumpTests/DumpTestBase.cs b/src/native/managed/cdac/tests/DumpTests/DumpTestBase.cs index 0da34a20d74821..f1c826f951743f 100644 --- a/src/native/managed/cdac/tests/DumpTests/DumpTestBase.cs +++ b/src/native/managed/cdac/tests/DumpTests/DumpTestBase.cs @@ -142,6 +142,18 @@ private void EvaluateSkipAttributes(TestConfiguration config, string callerName, if (_dumpInfo is not null) { + // Cross-bitness dump reading is not yet supported when a 32-bit host + // tries to read a 64-bit dump (see microsoft/clrmd#1423). + // The reverse (64-bit host reading 32-bit dump) works fine. + bool isDump64Bit = _dumpInfo.Arch is "x64" or "arm64" or "riscv64" or "loongarch64"; + bool isHost64Bit = IntPtr.Size == 8; + if (isDump64Bit && !isHost64Bit) + { + throw new SkipTestException( + $"32-bit host cannot read 64-bit dumps: dump is {_dumpInfo.Arch}. " + + $"See microsoft/clrmd#1423."); + } + foreach (SkipOnOSAttribute attr in method.GetCustomAttributes()) { if (attr.IncludeOnly is not null)