Skip to content

[cDAC] Fix DebugInfo error codes for methods without debug metadata and add P/Invoke dump tests#124783

Merged
max-charlamb merged 4 commits intodotnet:mainfrom
max-charlamb:cdac-debuginfo-errorcode-fix
Feb 25, 2026
Merged

[cDAC] Fix DebugInfo error codes for methods without debug metadata and add P/Invoke dump tests#124783
max-charlamb merged 4 commits intodotnet:mainfrom
max-charlamb:cdac-debuginfo-errorcode-fix

Conversation

@max-charlamb
Copy link
Copy Markdown
Member

@max-charlamb max-charlamb commented Feb 24, 2026

Summary

Fix GetILAddressMap and GetILOffsetsByAddress in the cDAC to return E_FAIL (matching the legacy DAC) when a method has no debug info, and add dump-based integration tests exercising ILStub and VarargPInvoke stack frames.

Problem

ILStubs are JIT-compiled but the JIT does not generate debug metadata for them — their RealCodeHeader.DebugInfo pointer is null. When SOS commands like !clru -il call GetILAddressMap on an ILStub:

  • Legacy DAC: ClrDataAccess::GetMethodNativeMap calls DebugInfoManager::GetBoundariesAndVars, which returns FALSE -> returns E_FAIL (0x80004005). This propagates through GetILAddressMap without ever reaching the E_NOINTERFACE path.
  • cDAC (before this fix): DebugInfo_1/2.GetMethodNativeMap attempted to read from the null debug info pointer -> VirtualReadException (0x80131c49) escaped through catch (Exception ex) { hr = ex.HResult; }, producing an HResult that doesn't match the DAC.

This caused Debug.Assert(hrLocal == hr) failures in CI when running SOS tests against the cDAC.

Fix

Contract change: HasDebugInfo API and non-nullable GetMethodNativeMap

The DAC has two distinct failure paths for empty/missing debug info:

Scenario DAC behavior HResult
No debug info exists (ILStubs) GetBoundariesAndVars returns FALSE E_FAIL (0x80004005)
Debug info exists, zero entries numMap == 0 after successful retrieval E_NOINTERFACE (0x80004002)

To avoid having a nullable return on GetMethodNativeMap (where null vs empty is a subtle distinction), the fix adds a new bool HasDebugInfo(TargetCodePointer pCode) API to the IDebugInfo contract. This lets callers explicitly check for the existence of debug info before calling GetMethodNativeMap, which always returns a non-nullable IEnumerable<OffsetMapping> (empty when no debug info exists).

In ClrDataMethodInstance, both GetILOffsetsByAddress and GetILAddressMap call HasDebugInfo first and throw E_FAIL when it returns false, matching the legacy DAC behavior.

New dump tests

Test infrastructure

  • DumpInfo — Metadata class that records OS/arch in dump-info.json alongside dumps, enabling platform-aware test skipping.
  • SkipOnOSAttribute[SkipOnOS(IncludeOnly = "windows")] skips tests when the dump wasn't generated on the specified OS. Supports both exclude and include-only modes.
  • DumpTests.targets — MSBuild target that auto-generates dump-info.json during dump creation.

Debuggees

  • VarargPInvoke — Calls sprintf via __arglist, triggering the VarargPInvokeStub assembly thunk path. Crashes inside native code so the stub frame is on the stack.
  • PInvokeStub — Uses SetLastError=true on a P/Invoke to force an ILStub DynamicMethodDesc. Crashes inside memcpy with null args.
CI Failure
SOSRunner processing SOS.VarargPInvokeInteropMD
{
    Running Process: D:\a\_work\1\s\.packages\cdb-sos\10.0.26100.1\runtimes\win-x64\native\cdb.exe  -y "D:\a\_work\1\s\artifacts\bin\VarargPInvokeInteropMD\Release\net10.0" -c ".load D:\a\_work\1\s\artifacts\bin\Windows_NT.x64.Release\runcommand.dll" -Gsins D:\a\_work\1\s\artifacts\dotnet-test\dotnet.exe --fx-version 10.0.2 D:\a\_work\1\s\artifacts\bin\VarargPInvokeInteropMD\Release\net10.0\VarargPInvokeInteropMD.dll
    Working Directory: 
    Additional Environment Variables: DOTNET_ROOT=D:\a\_work\1\s\artifacts\dotnet-test, DOTNET_ENABLE_CDAC=1, DOTNET_ENABLED_SOS_LOGGING=D:\a\_work\1\s\artifacts\TestResults\Release\sos.unittests_2026_02_24_02_05_25_6647\SOS.VarargPInvokeInteropMD.projectk.sdk.prebuilt.cdac.10.0.2.soslog, DOTNET_EnableWriteXorExecute=0
    {
        00:00.128: 
        00:00.128: ************* Preparing the environment for Debugger Extensions Gallery repositories **************
        00:00.128:    ExtensionRepository : Implicit
        00:00.128:    UseExperimentalFeatureForNugetShare : true
        00:00.128:    AllowNugetExeUpdate : true
        00:00.128:    NonInteractiveNuget : true
        00:00.128:    AllowNugetMSCredentialProviderInstall : true
        00:00.128:    AllowParallelInitializationOfLocalRepositories : true
        00:00.128: 
        00:00.128:    EnableRedirectToV8JsProvider : false
        00:00.128: 
        00:00.128:    -- Configuring repositories
        00:00.128:       ----> Repository : LocalInstalled, Enabled: true
        00:00.128:       ----> Repository : UserExtensions, Enabled: true
        00:00.128: 
        00:00.128: >>>>>>>>>>>>> Preparing the environment for Debugger Extensions Gallery repositories completed, duration 0.000 seconds
        00:00.128: 
        00:00.128: ************* Waiting for Debugger Extensions Gallery to Initialize **************
        00:00.139: 
        00:00.139: >>>>>>>>>>>>> Waiting for Debugger Extensions Gallery to Initialize completed, duration 0.016 seconds
        00:00.139:    ----> Repository : UserExtensions, Enabled: true, Packages count: 0
        00:00.139:    ----> Repository : LocalInstalled, Enabled: true, Packages count: 0
        00:00.139: 
        00:00.139: Microsoft (R) Windows Debugger Version 10.0.26100.1 AMD64
        00:00.139: Copyright (c) Microsoft Corporation. All rights reserved.
        00:00.139: 
        00:00.139: CommandLine: D:\a\_work\1\s\artifacts\dotnet-test\dotnet.exe --fx-version 10.0.2 D:\a\_work\1\s\artifacts\bin\VarargPInvokeInteropMD\Release\net10.0\VarargPInvokeInteropMD.dll
        00:00.145: Unable to add extension DLL: ntsdexts
        00:00.145: Unable to add extension DLL: uext
        00:00.146: Unable to add extension DLL: exts
        00:00.146: 
        00:00.146: ************* Path validation summary **************
        00:00.146: Response                         Time (ms)     Location
        00:00.146: OK                                             D:\a\_work\1\s\artifacts\bin\VarargPInvokeInteropMD\Release\net10.0
        00:00.146: Symbol search path is: D:\a\_work\1\s\artifacts\bin\VarargPInvokeInteropMD\Release\net10.0
        00:00.146: Executable search path is: 
        00:00.146: ModLoad: 00007ff6`12860000 00007ff6`1288a000   dotnet.exe
        00:00.147: ModLoad: 00007ffd`9bb00000 00007ffd`9bd67000   ntdll.dll
        00:00.148: ModLoad: 00007ffd`998a0000 00007ffd`99969000   C:\Windows\System32\KERNEL32.DLL
        00:00.149: ModLoad: 00007ffd`98d80000 00007ffd`9916e000   C:\Windows\System32\KERNELBASE.dll
        00:00.150: ModLoad: 00007ffd`992f0000 00007ffd`9943b000   C:\Windows\System32\ucrtbase.dll
        00:00.151: (8b0.13a4): Break instruction exception - code 80000003 (first chance)
        00:00.157: ntdll!RtlGetReturnAddressHijackTarget+0x6ed:
        00:00.157: 00007ffd`9bc1f4ed cc              int     3
        00:00.157: 0:000> cdb: Reading initial command '.load D:\a\_work\1\s\artifacts\bin\Windows_NT.x64.Release\runcommand.dll'
        00:00.157: <END_COMMAND_OUTPUT>
        00:00.157: 0:000> 
        STDIN: 00:00.157: !runcommand sxd dz
        00:00.158: <END_COMMAND_OUTPUT>
        00:00.158: 0:000> 
        STDIN: 00:00.158: !runcommand sxd iov
        00:00.158: <END_COMMAND_OUTPUT>
        00:00.158: 0:000> 
        STDIN: 00:00.158: !runcommand .extpath D:\a\_work\1\s\artifacts\bin\Windows_NT.x64.Release
        00:00.158: Extension search path is: D:\a\_work\1\s\artifacts\bin\Windows_NT.x64.Release
        00:00.158: <END_COMMAND_OUTPUT>
        00:00.158: 0:000> 
        STDIN: 00:00.158: !runcommand .outmask- 0x244
        00:00.158: Client 000001FFB4DDED00 mask is 1B3
        00:00.158: <END_COMMAND_OUTPUT>
        00:00.158: 0:000> 
        STDIN: 00:00.158: !runcommand !sym quiet
        00:00.158: quiet mode - symbol prompts off
        00:00.158: <END_COMMAND_OUTPUT>
        00:00.158: 0:000> 
        STDIN: 00:00.158: !runcommand .lines
        00:00.159: Line number information will be loaded
        00:00.159: <END_COMMAND_OUTPUT>
        00:00.159: 0:000> 
        STDIN: 00:00.159: !runcommand dx @Debugger.Settings.EngineInitialization.SecureLoadDotNetExtensions=false
        00:00.159: @Debugger.Settings.EngineInitialization.SecureLoadDotNetExtensions=false : false
        00:00.159: <END_COMMAND_OUTPUT>
        STARTING SCRIPT: D:\a\_work\1\s\artifacts\bin\SOS.UnitTests\Scripts\VarargPInvokeInteropMD.script
        %DEBUGGEE_EXE% => D:\a\_work\1\s\artifacts\bin\VarargPInvokeInteropMD\Release\net10.0\VarargPInvokeInteropMD.dll
        %DUMP_NAME% => D:\a\_work\1\s\artifacts\tmp\Release\dumps\ProjectK\10.0.2\net10.0\SOS.VarargPInvokeInteropMD.Heap.dmp
        %DEBUG_ROOT% => D:\a\_work\1\s\artifacts\bin\VarargPInvokeInteropMD\Release\net10.0
        %TEST_NAME% => SOS.VarargPInvokeInteropMD
        %LOG_PATH% => D:\a\_work\1\s\artifacts\TestResults\Release\sos.unittests_2026_02_24_02_05_25_6647
        %LOG_SUFFIX% => projectk.sdk.prebuilt.cdac.10.0.2
        %SOS_PATH% => D:\a\_work\1\s\artifacts\bin\Windows_NT.x64.Release\sos.dll
        %DESKTOP_RUNTIME_PATH% => 
        <DEBUGGEE_EXE> => D:\\a\\_work\\1\\s\\artifacts\\bin\\VarargPInvokeInteropMD\\Release\\net10.0\\VarargPInvokeInteropMD.dll
        <DEBUG_ROOT> => D:\\a\\_work\\1\\s\\artifacts\\bin\\VarargPInvokeInteropMD\\Release\\net10.0
        <SOURCE_PATH> => D:\\a\\_work\\1\\s\\artifacts\\test\\DebuggeeSources\\SOS.UnitTests\\Debuggees\\VarargPInvokeInteropMD
        <HEXVAL> => [A-Fa-f0-9]+(`[A-Fa-f0-9]+)?
        <DECVAL> => [,0-9]+(`[,0-9]+)?
        CDB
        WINDOWS
        PROJECTK
        X64
        MAJOR_RUNTIME_VERSION_10
        MAJOR_RUNTIME_VERSION_GE_3
        MAJOR_RUNTIME_VERSION_GE_5
        MAJOR_RUNTIME_VERSION_GE_6
        MAJOR_RUNTIME_VERSION_GE_7
        MAJOR_RUNTIME_VERSION_GE_8
        MAJOR_RUNTIME_VERSION_GE_9
        LIVE
        64BIT
        NETCORE_OR_DOTNETDUMP
        00:00.159: 0:000> 
        STDIN: 00:00.160: g
        00:00.163: ModLoad: 00007ffd`57620000 00007ffd`5767f000   D:\a\_work\1\s\artifacts\dotnet-test\host\fxr\10.0.2\hostfxr.dll
        00:00.163: ModLoad: 00007ffd`9a210000 00007ffd`9a2c4000   C:\Windows\System32\ADVAPI32.dll
        00:00.163: ModLoad: 00007ffd`9ad40000 00007ffd`9ade9000   C:\Windows\System32\msvcrt.dll
        00:00.163: ModLoad: 00007ffd`99c30000 00007ffd`99cd6000   C:\Windows\System32\sechost.dll
        00:00.164: ModLoad: 00007ffd`9aa00000 00007ffd`9ab18000   C:\Windows\System32\RPCRT4.dll
        00:00.166: ModLoad: 00007ffd`4b560000 00007ffd`4b80c000   D:\a\_work\1\s\artifacts\dotnet-test\shared\Microsoft.NETCore.App\10.0.2\hostpolicy.dll
        00:00.206: ModLoad: 00007ffd`43010000 00007ffd`434f1000   D:\a\_work\1\s\artifacts\dotnet-test\shared\Microsoft.NETCore.App\10.0.2\coreclr.dll
        00:00.206: ModLoad: 00007ffd`9b1c0000 00007ffd`9b357000   C:\Windows\System32\ole32.dll
        00:00.206: ModLoad: 00007ffd`995b0000 00007ffd`99653000   C:\Windows\System32\msvcp_win.dll
        00:00.206: ModLoad: 00007ffd`9ad10000 00007ffd`9ad3b000   C:\Windows\System32\GDI32.dll
        00:00.207: ModLoad: 00007ffd`99580000 00007ffd`995a7000   C:\Windows\System32\win32u.dll
        00:00.207: ModLoad: 00007ffd`98c50000 00007ffd`98d7c000   C:\Windows\System32\gdi32full.dll
        00:00.207: ModLoad: 00007ffd`9adf0000 00007ffd`9afb5000   C:\Windows\System32\USER32.dll
        00:00.208: ModLoad: 00007ffd`9a610000 00007ffd`9a996000   C:\Windows\System32\combase.dll
        00:00.208: ModLoad: 00007ffd`9a2d0000 00007ffd`9a3a6000   C:\Windows\System32\OLEAUT32.dll
        00:00.209: ModLoad: 00007ffd`8bd70000 00007ffd`8bd7b000   C:\Windows\SYSTEM32\VERSION.dll
        00:00.210: ModLoad: 00007ffd`9ab20000 00007ffd`9ab51000   C:\Windows\System32\IMM32.DLL
        00:00.245: ModLoad: 00007ffd`99440000 00007ffd`994e5000   C:\Windows\System32\bcryptPrimitives.dll
        00:00.252: (8b0.13a4): Unknown exception - code 04242420 (first chance)
        00:00.257: ModLoad: 00007ffd`97070000 00007ffd`9708b000   C:\Windows\SYSTEM32\kernel.appcore.dll
        00:00.259: ModLoad: 00007ffd`39f80000 00007ffd`3afcb000   D:\a\_work\1\s\artifacts\dotnet-test\shared\Microsoft.NETCore.App\10.0.2\System.Private.CoreLib.dll
        00:00.307: ModLoad: 000001e6`81d20000 000001e6`81d2a000   D:\a\_work\1\s\artifacts\bin\VarargPInvokeInteropMD\Release\net10.0\VarargPInvokeInteropMD.dll
        00:00.307: ModLoad: 000001e6`81d30000 000001e6`81d3e000   D:\a\_work\1\s\artifacts\dotnet-test\shared\Microsoft.NETCore.App\10.0.2\System.Runtime.dll
        00:00.308: ModLoad: 00007ffd`413d0000 00007ffd`415fa000   D:\a\_work\1\s\artifacts\dotnet-test\shared\Microsoft.NETCore.App\10.0.2\clrjit.dll
        00:00.309: (8b0.13a4): Break instruction exception - code 80000003 (first chance)
        00:00.340: *** WARNING: Unable to verify checksum for D:\a\_work\1\s\artifacts\dotnet-test\shared\Microsoft.NETCore.App\10.0.2\coreclr.dll
        00:00.342: KERNELBASE!DebugBreak+0x2:
        00:00.342: 00007ffd`98e99192 cc              int     3
        00:00.342: <END_COMMAND_OUTPUT>
        00:00.342: 0:000> 
        STDIN: 00:00.343: !runcommand .unload sos
        00:00.343: No extension named 'sos' in chain
        00:00.343: <END_COMMAND_OUTPUT>
        00:00.343: 0:000> 
        STDIN: 00:00.343: !runcommand .load D:\a\_work\1\s\artifacts\bin\Windows_NT.x64.Release\sos.dll
        00:00.344: <END_COMMAND_OUTPUT>
        00:00.344: 0:000> 
        STDIN: 00:00.344: !runcommand .reload
        00:00.344: Reloading current modules
        00:00.344: ............................
        00:00.377: *** WARNING: Unable to verify checksum for D:\a\_work\1\s\artifacts\dotnet-test\shared\Microsoft.NETCore.App\10.0.2\coreclr.dll
        00:00.379: 
        00:00.379: ************* Symbol Loading Error Summary **************
        00:00.379: Module name            Error
        00:00.379: KERNELBASE             The system cannot find the file specified
        00:00.379: 
        00:00.379: You can troubleshoot most symbol related issues by turning on symbol loading diagnostics (!sym noisy) and repeating the command that caused symbols to be loaded.
        00:00.379: You should also verify that your symbol search path (.sympath) is correct.
        00:00.379: <END_COMMAND_OUTPUT>
        00:00.379: 0:000> 
        STDIN: 00:00.379: !runcommand .chain
        00:00.380: Extension DLL search Path:
        00:00.380:     D:\a\_work\1\s\artifacts\bin\Windows_NT.x64.Release
        00:00.380: Extension DLL chain:
        00:00.380:     D:\a\_work\1\s\artifacts\bin\Windows_NT.x64.Release\sos.dll: image 10,0,14,12332 @Commit: f30239ef079eadb14de95b1ddc8fcb0448dfd91d, API 2.0.0, built Tue Feb 24 01:54:55 2026
        00:00.380:         [path: D:\a\_work\1\s\artifacts\bin\Windows_NT.x64.Release\sos.dll]
        00:00.380:     D:\a\_work\1\s\artifacts\bin\Windows_NT.x64.Release\runcommand.dll: API 1.0.0, built Tue Feb 24 01:54:47 2026
        00:00.380:         [path: D:\a\_work\1\s\artifacts\bin\Windows_NT.x64.Release\runcommand.dll]
        00:00.380:     dbghelp: image 10.0.26100.1, API 10.0.6, 
        00:00.380:         [path: D:\a\_work\1\s\.packages\cdb-sos\10.0.26100.1\runtimes\win-x64\native\dbghelp.dll]
        00:00.380: <END_COMMAND_OUTPUT>
        00:00.380: 0:000> 
        STDIN: 00:00.380: !runcommand !SetHostRuntime D:\a\_work\1\s\artifacts\dotnet-test\shared\Microsoft.NETCore.App\10.0.2
        00:00.381: Using .NET Core runtime (version 10.0) to host the managed SOS code
        00:00.381: Host runtime path: D:\a\_work\1\s\artifacts\dotnet-test\shared\Microsoft.NETCore.App\10.0.2
        00:00.381: <END_COMMAND_OUTPUT>
        00:00.381: 0:000> 
        STDIN: 00:00.381: !runcommand bm msvcrt!printf
        00:00.384:   0: 00007ffd`9ad8d280 @!"msvcrt!printf"
        00:00.384: <END_COMMAND_OUTPUT>
        00:00.384: 0:000> 
        STDIN: 00:00.384: g
        00:00.386: Breakpoint 0 hit
        00:00.391: msvcrt!printf:
        00:00.391: 00007ffd`9ad8d280 488bc4          mov     rax,rsp
        00:00.391: <END_COMMAND_OUTPUT>
        00:00.391: 0:000> 
        STDIN: 00:00.391: !runcommand !clrstack
        00:00.702: OS Thread Id: 0x13a4 (0)
        00:00.713:         Child SP               IP Call Site
        00:00.713: 00000071F937E770 00007ffd9ad8d280 [InlinedCallFrame: 00000071f937e770] VarargPInvokeInteropMD.Interop.printf(System.String, ...)
        00:00.719: 00000071F937E770 00007ffce369021a [InlinedCallFrame: 00000071f937e770] VarargPInvokeInteropMD.Interop.printf(System.String, ...)
        00:00.719: 00000071F937E740 00007FFCE369021A ILStubClass.IL_STUB_PInvoke(System.String, Int32, Double, ...)
        00:00.765: 00000071F937E860 00007FFCE35B18B0 VarargPInvokeInteropMD.Program.Main() [/_/src/tests/SOS.UnitTests/Debuggees/VarargPInvokeInteropMD/Program.cs @ 16]
        00:00.771: <END_COMMAND_OUTPUT>
        00:00.771: 0:000> 
        STDIN: 00:00.772: !runcommand !IP2MD 00007FFCE369021A
        00:00.774: MethodDesc:   00007ffce3677b38
        00:00.774: Method Name:          ILStubClass.IL_STUB_PInvoke(System.String, Int32, Double, ...)
        00:00.775: Class:                00007ffce3677ac8
        00:00.775: MethodTable:          00007ffce3677ac8
        00:00.775: mdToken:              0000000006000000
        00:00.775: Module:               00007ffce3671b00
        00:00.775: IsJitted:             yes
        00:00.775: Current CodeAddr:     00007ffce3690040
        00:00.775: Version History:
        00:00.775:   ILCodeVersion:      0000000000000000
        00:00.775:   ReJIT ID:           0
        00:00.775:   IL Addr:            0000000000000000
        00:00.776:      CodeAddr:           00007ffce3690040  (MinOptJitted)
        00:00.776:      NativeCodeVersion:  0000000000000000
        00:00.777: <END_COMMAND_OUTPUT>
        00:00.777: 0:000> 
        STDIN: 00:00.777: !runcommand !clru 00007ffce3677b38
        00:00.779: Normal JIT generated code
        00:00.779: ILStubClass.IL_STUB_PInvoke(System.String, Int32, Double, ...)
        00:00.779: Begin 00007FFCE3690040, size 279
        00:00.780: 00007ffc`e3690040 48894c2408      mov     qword ptr [rsp+8],rcx
        00:00.781: 00007ffc`e3690045 4889542410      mov     qword ptr [rsp+10h],rdx
        00:00.783: 00007ffc`e369004a 4c89442418      mov     qword ptr [rsp+18h],r8
        00:00.785: 00007ffc`e369004f 4c894c2420      mov     qword ptr [rsp+20h],r9
        00:00.787: 00007ffc`e3690054 55              push    rbp
        00:00.789: 00007ffc`e3690055 4157            push    r15
        00:00.790: 00007ffc`e3690057 4156            push    r14
        00:00.791: 00007ffc`e3690059 4155            push    r13
        00:00.793: 00007ffc`e369005b 4154            push    r12
        00:00.794: 00007ffc`e369005d 57              push    rdi
        00:00.795: 00007ffc`e369005e 56              push    rsi
        00:00.797: 00007ffc`e369005f 53              push    rbx
        00:00.798: 00007ffc`e3690060 4881ecd8000000  sub     rsp,0D8h
        00:00.800: 00007ffc`e3690067 488d6c2420      lea     rbp,[rsp+20h]
        00:00.801: 00007ffc`e369006c 48b8159c0d35fdc40000 mov rax,0C4FD350D9C15h
        00:00.802: 00007ffc`e3690076 488985b0000000  mov     qword ptr [rbp+0B0h],rax
        00:00.804: 00007ffc`e369007d 48898d00010000  mov     qword ptr [rbp+100h],rcx
        00:00.805: 00007ffc`e3690084 48899508010000  mov     qword ptr [rbp+108h],rdx
        00:00.806: 00007ffc`e369008b 44898510010000  mov     dword ptr [rbp+110h],r8d
        00:00.808: 00007ffc`e3690092 c5fb119d18010000 vmovsd  qword ptr [rbp+118h],xmm3
        00:00.809: 00007ffc`e369009a 4c895568        mov     qword ptr [rbp+68h],r10
        00:00.810: 00007ffc`e369009e 488b4568        mov     rax,qword ptr [rbp+68h]
        00:00.811: 00007ffc`e36900a2 48894548        mov     qword ptr [rbp+48h],rax
        00:00.813: 00007ffc`e36900a6 488d4d10        lea     rcx,[rbp+10h]
        00:00.836: 00007ffc`e36900aa e81127a85f      call    coreclr!JIT_InitPInvokeFrame (00007ffd`431127c0)
        00:00.838: 00007ffc`e36900af 48894550        mov     qword ptr [rbp+50h],rax
        00:00.840: 00007ffc`e36900b3 488bc4          mov     rax,rsp
        00:00.841: 00007ffc`e36900b6 48894528        mov     qword ptr [rbp+28h],rax
        00:00.843: 00007ffc`e36900ba 488bc5          mov     rax,rbp
        00:00.845: 00007ffc`e36900bd 48894538        mov     qword ptr [rbp+38h],rax
        00:00.847: 00007ffc`e36900c1 488b4550        mov     rax,qword ptr [rbp+50h]
        00:00.849: 00007ffc`e36900c5 488d4d10        lea     rcx,[rbp+10h]
        00:00.850: 00007ffc`e36900c9 48894808        mov     qword ptr [rax+8],rcx
        00:00.852: 00007ffc`e36900cd 33c0            xor     eax,eax
        00:00.854: 00007ffc`e36900cf 8985ac000000    mov     dword ptr [rbp+0ACh],eax
        00:00.856: 00007ffc`e36900d5 90              nop
        00:00.857: 00007ffc`e36900d6 33c0            xor     eax,eax
        00:00.859: 00007ffc`e36900d8 8bc0            mov     eax,eax
        00:00.861: 00007ffc`e36900da 48898590000000  mov     qword ptr [rbp+90h],rax
        00:00.863: 00007ffc`e36900e1 4883bd0801000000 cmp     qword ptr [rbp+108h],0
        00:00.865: 00007ffc`e36900e9 0f848b000000    je      00007ffc`e369017a
        00:00.866: 00007ffc`e36900ef 488b8d08010000  mov     rcx,qword ptr [rbp+108h]
        00:00.868: 00007ffc`e36900f6 ff15dcc2ecff    call    qword ptr [00007ffc`e355c3d8]
        00:00.870: 00007ffc`e36900fc 83c002          add     eax,2
        00:00.872: 00007ffc`e36900ff 89450c          mov     dword ptr [rbp+0Ch],eax
        00:00.874: 00007ffc`e3690102 48b9d89e67e3fc7f0000 mov rcx,7FFCE3679ED8h (MT: System.Runtime.InteropServices.Marshal)
        00:00.884: 00007ffc`e369010c ff152e56ecff    call    qword ptr [00007ffc`e3555740]
        00:00.886: 00007ffc`e3690112 8b450c          mov     eax,dword ptr [rbp+0Ch]
        00:00.887: 00007ffc`e3690115 0faf0530afe0ff  imul    eax,dword ptr [00007ffc`e349b04c]
        00:00.889: 00007ffc`e369011c 7105            jno     00007ffc`e3690123
        00:00.891: 00007ffc`e369011e e84d16ecff      call    00007ffc`e3551770 (JitHelp: CORINFO_HELP_OVERFLOW)
        00:00.892: 00007ffc`e3690123 89859c000000    mov     dword ptr [rbp+9Ch],eax
        00:00.894: 00007ffc`e3690129 81bd9c00000005010000 cmp dword ptr [rbp+9Ch],105h
        00:00.895: 00007ffc`e3690133 7f45            jg      00007ffc`e369017a
        00:00.897: 00007ffc`e3690135 8b859c000000    mov     eax,dword ptr [rbp+9Ch]
        00:00.899: 00007ffc`e369013b 85c0            test    eax,eax
        00:00.901: 00007ffc`e369013d 7434            je      00007ffc`e3690173
        00:00.903: 00007ffc`e369013f 8bc8            mov     ecx,eax
        00:00.904: 00007ffc`e3690141 83c10f          add     ecx,0Fh
        00:00.908: 00007ffc`e3690144 83e1f0          and     ecx,0FFFFFFF0h
        00:00.909: 00007ffc`e3690147 4883c420        add     rsp,20h
        00:00.911: 00007ffc`e369014b 48f7d9          neg     rcx
        00:00.913: 00007ffc`e369014e 4803cc          add     rcx,rsp
        00:00.915: 00007ffc`e3690151 7202            jb      00007ffc`e3690155
        00:00.917: 00007ffc`e3690153 33c9            xor     ecx,ecx
        00:00.918: 00007ffc`e3690155 852424          test    dword ptr [rsp],esp
        00:00.920: 00007ffc`e3690158 4881ec00100000  sub     rsp,1000h
        00:00.922: 00007ffc`e369015f 483be1          cmp     rsp,rcx
        00:00.924: 00007ffc`e3690162 73f1            jae     00007ffc`e3690155
        00:00.926: 00007ffc`e3690164 488be1          mov     rsp,rcx
        00:00.928: 00007ffc`e3690167 852424          test    dword ptr [rsp],esp
        00:00.929: 00007ffc`e369016a 4883ec20        sub     rsp,20h
        00:00.931: 00007ffc`e369016e 488d442420      lea     rax,[rsp+20h]
        00:00.933: 00007ffc`e3690173 48898590000000  mov     qword ptr [rbp+90h],rax
        00:00.935: 00007ffc`e369017a 4c8b8590000000  mov     r8,qword ptr [rbp+90h]
        00:00.937: 00007ffc`e3690181 488b9508010000  mov     rdx,qword ptr [rbp+108h]
        00:00.938: 00007ffc`e3690188 b901000000      mov     ecx,1
        00:00.940: 00007ffc`e369018d ff155dc2ecff    call    qword ptr [00007ffc`e355c3f0]
        00:00.941: 00007ffc`e3690193 488985a0000000  mov     qword ptr [rbp+0A0h],rax
        00:00.943: 00007ffc`e369019a c785ac00000001000000 mov dword ptr [rbp+0ACh],1
        00:00.944: 00007ffc`e36901a4 90              nop
        00:00.946: 00007ffc`e36901a5 90              nop
        00:00.947: 00007ffc`e36901a6 8b8510010000    mov     eax,dword ptr [rbp+110h]
        00:00.949: 00007ffc`e36901ac 4898            cdqe
        00:00.950: 00007ffc`e36901ae 48898588000000  mov     qword ptr [rbp+88h],rax
        00:00.952: 00007ffc`e36901b5 90              nop
        00:00.953: 00007ffc`e36901b6 90              nop
        00:00.955: 00007ffc`e36901b7 c5fb108518010000 vmovsd  xmm0,qword ptr [rbp+118h]
        00:00.956: 00007ffc`e36901bf c5fb118580000000 vmovsd  qword ptr [rbp+80h],xmm0
        00:00.958: 00007ffc`e36901c7 90              nop
        00:00.959: 00007ffc`e36901c8 90              nop
        00:00.961: 00007ffc`e36901c9 90              nop
        00:00.962: 00007ffc`e36901ca b820000000      mov     eax,20h
        00:00.963: 00007ffc`e36901cf 8bc0            mov     eax,eax
        00:00.965: 00007ffc`e36901d1 488b4d68        mov     rcx,qword ptr [rbp+68h]
        00:00.966: 00007ffc`e36901d5 488b0408        mov     rax,qword ptr [rax+rcx]
        00:00.968: 00007ffc`e36901d9 48894560        mov     qword ptr [rbp+60h],rax
        00:00.969: 00007ffc`e36901dd 90              nop
        00:00.971: 00007ffc`e36901de 488b8da0000000  mov     rcx,qword ptr [rbp+0A0h]
        00:00.972: 00007ffc`e36901e5 488b9588000000  mov     rdx,qword ptr [rbp+88h]
        00:00.974: 00007ffc`e36901ec c5fb109580000000 vmovsd  xmm2,qword ptr [rbp+80h]
        00:00.975: 00007ffc`e36901f4 488b4568        mov     rax,qword ptr [rbp+68h]
        00:00.977: 00007ffc`e36901f8 48894520        mov     qword ptr [rbp+20h],rax
        00:00.979: 00007ffc`e36901fc 488d0517000000  lea     rax,[00007ffc`e369021a]
        00:00.980: 00007ffc`e3690203 48894530        mov     qword ptr [rbp+30h],rax
        00:00.982: 00007ffc`e3690207 488b4550        mov     rax,qword ptr [rbp+50h]
        00:00.983: 00007ffc`e369020b c6400400        mov     byte ptr [rax+4],0
        00:00.985: 00007ffc`e369020f 488b4560        mov     rax,qword ptr [rbp+60h]
        00:00.986: 00007ffc`e3690213 c4c1f97ed0      vmovq   r8,xmm2
        00:00.988: 00007ffc`e3690218 ffd0            call    rax
        00:00.989: 00007ffc`e369021a 488b4d50        mov     rcx,qword ptr [rbp+50h]
        00:00.991: 00007ffc`e369021e c6410401        mov     byte ptr [rcx+4],1
        00:00.995: 00007ffc`e3690222 833da761e05f00  cmp     dword ptr [coreclr!g_TrapReturningThreads (00007ffd`434963d0)],0
        00:00.996: 00007ffc`e3690229 7406            je      00007ffc`e3690231
        00:01.003: 00007ffc`e369022b ff15af43df5f    call    qword ptr [coreclr!hlpDynamicFuncTable+0x170 (00007ffd`434845e0)] (JitHelp: CORINFO_HELP_STOP_FOR_GC)
        00:01.005: 00007ffc`e3690231 894578          mov     dword ptr [rbp+78h],eax
        00:01.006: 00007ffc`e3690234 8b4578          mov     eax,dword ptr [rbp+78h]
        00:01.008: 00007ffc`e3690237 89457c          mov     dword ptr [rbp+7Ch],eax
        00:01.009: 00007ffc`e369023a 90              nop
        00:01.011: 00007ffc`e369023b 8b457c          mov     eax,dword ptr [rbp+7Ch]
        00:01.013: 00007ffc`e369023e 894574          mov     dword ptr [rbp+74h],eax
        00:01.014: 00007ffc`e3690241 90              nop
        00:01.016: 00007ffc`e3690242 90              nop
        00:01.018: 00007ffc`e3690243 90              nop
        00:01.019: 00007ffc`e3690244 90              nop
        00:01.021: 00007ffc`e3690245 90              nop
        00:01.022: 00007ffc`e3690246 90              nop
        00:01.024: 00007ffc`e3690247 e843000000      call    00007ffc`e369028f (ILStubClass.IL_STUB_PInvoke(System.String, Int32, Double, ...), mdToken: 0000000006000000)
        00:01.026: 00007ffc`e369024c 90              nop
        00:01.027: 00007ffc`e369024d 8b4574          mov     eax,dword ptr [rbp+74h]
        00:01.029: 00007ffc`e3690250 89455c          mov     dword ptr [rbp+5Ch],eax
        00:01.030: 00007ffc`e3690253 8b455c          mov     eax,dword ptr [rbp+5Ch]
        00:01.032: 00007ffc`e3690256 488b4d50        mov     rcx,qword ptr [rbp+50h]
        00:01.033: 00007ffc`e369025a 488b5518        mov     rdx,qword ptr [rbp+18h]
        00:01.035: 00007ffc`e369025e 48895108        mov     qword ptr [rcx+8],rdx
        00:01.037: 00007ffc`e3690262 49b9159c0d35fdc40000 mov r9,0C4FD350D9C15h
        00:01.038: 00007ffc`e369026c 4c398db0000000  cmp     qword ptr [rbp+0B0h],r9
        00:01.040: 00007ffc`e3690273 7405            je      00007ffc`e369027a
        00:01.042: 00007ffc`e3690275 e856e3c85f      call    coreclr!JIT_FailFast (00007ffd`4331e5d0)
        00:01.044: 00007ffc`e369027a 90              nop
        00:01.045: 00007ffc`e369027b 488da5b8000000  lea     rsp,[rbp+0B8h]
        00:01.047: 00007ffc`e3690282 5b              pop     rbx
        00:01.049: 00007ffc`e3690283 5e              pop     rsi
        00:01.050: 00007ffc`e3690284 5f              pop     rdi
        00:01.052: 00007ffc`e3690285 415c            pop     r12
        00:01.053: 00007ffc`e3690287 415d            pop     r13
        00:01.055: 00007ffc`e3690289 415e            pop     r14
        00:01.057: 00007ffc`e369028b 415f            pop     r15
        00:01.058: 00007ffc`e369028d 5d              pop     rbp
        00:01.060: 00007ffc`e369028e c3              ret
        00:01.061: 00007ffc`e369028f 4883ec28        sub     rsp,28h
        00:01.063: 00007ffc`e3690293 83bdac00000000  cmp     dword ptr [rbp+0ACh],0
        00:01.065: 00007ffc`e369029a 7e17            jle     00007ffc`e36902b3
        00:01.066: 00007ffc`e369029c 4883bd9000000000 cmp     qword ptr [rbp+90h],0
        00:01.068: 00007ffc`e36902a4 750d            jne     00007ffc`e36902b3
        00:01.069: 00007ffc`e36902a6 488b8da0000000  mov     rcx,qword ptr [rbp+0A0h]
        00:01.071: 00007ffc`e36902ad ff1555c1ecff    call    qword ptr [00007ffc`e355c408]
        00:01.073: 00007ffc`e36902b3 90              nop
        00:01.075: 00007ffc`e36902b4 4883c428        add     rsp,28h
        00:01.076: 00007ffc`e36902b8 c3              ret
        00:01.076: <END_COMMAND_OUTPUT>
        00:01.076: 0:000> 
        STDIN: 00:01.077: !runcommand !clru -il 00007ffce3677b38
        00:01.079: Normal JIT generated code
        00:01.079: ILStubClass.IL_STUB_PInvoke(System.String, Int32, Double, ...)
        STDERROR: 00:01.094: Process terminated. Assertion failed.
        STDERROR: 00:01.094: HResult - cDAC: 80131c49, DAC: 80004005
        STDERROR: 00:01.094:    at System.Diagnostics.DebugProvider.Fail(String, String)
        STDERROR: 00:01.094:    at System.Diagnostics.Debug.Fail(String, String)
        STDERROR: 00:01.094:    at System.Diagnostics.Debug.Assert(Boolean, String, String)
        STDERROR: 00:01.094:    at System.Diagnostics.Debug.Assert(Boolean, String)
        STDERROR: 00:01.094:    at System.Diagnostics.Debug.Assert(Boolean, Debug.AssertInterpolatedStringHandler&)
        STDERROR: 00:01.094:    at Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataMethodInstance.Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataMethodInstance.GetILAddressMap(UInt32, UInt32*, ClrDataILAddressMap[])
        STDERROR: 00:01.094:    at <Microsoft_Diagnostics_DataContractReader_Legacy_IXCLRDataMethodInstance>F41543E3FD27CB68C687D21380C4C62854853A78568F98B4D36FEDFF61FA5EFE1__InterfaceImplementation.ABI_GetILAddressMap(ComWrappers.ComInterfaceDispatch*, UInt32, UInt32*, ClrDataILAddressMap*)
    }
    Process 2896 exited 57005 (00:02.410 elapsed)
    
    SOSRunner error at D:\a\_work\1\s\artifacts\bin\SOS.UnitTests\Scripts\VarargPInvokeInteropMD.script:37
    Excerpt from D:\a\_work\1\s\artifacts\bin\SOS.UnitTests\Scripts\VarargPInvokeInteropMD.script:
       35 # Verify that !u -il works on IL stubs (should succeed without IL interleaving since stubs have no IL body)
       36 SOSCOMMAND:clru -il <PREVPOUT>
       37 VERIFY:\s*Normal JIT generated code\s+
       38 VERIFY:\s+ILStubClass\.IL_STUB_PInvoke\(
       39 VERIFY:\s+Begin\s+<HEXVAL>,\s+size\s+<HEXVAL>\s+
        00:02.410: <END_COMMAND_ERROR>
    Exception executing SOSStatus System.Exception: CDB exited unexpectedly executing '!SOSStatus'
   at SOSRunner.HandleCommand(String input, Boolean addPrefix) in /_/src/tests/SOS.UnitTests/SOSRunner.cs:line 1361
   at SOSRunner.RunCommand(String command, Boolean addPrefix) in /_/src/tests/SOS.UnitTests/SOSRunner.cs:line 1220
   at SOSRunner.RunSosCommand(String command, Boolean extensionCommand) in /_/src/tests/SOS.UnitTests/SOSRunner.cs:line 1200
   at SOSRunner.RunScript(String scriptRelativePath) in /_/src/tests/SOS.UnitTests/SOSRunner.cs:line 943
    System.Exception: VerifyOutput: no last command output or debugger exited unexpectedly: \s*Normal JIT generated code\s+
   at SOSRunner.RunScript(String scriptRelativePath) in /_/src/tests/SOS.UnitTests/SOSRunner.cs:line 912
   at SOSRunner.RunScript(String scriptRelativePath) in /_/src/tests/SOS.UnitTests/SOSRunner.cs:line 949
}

Copilot AI review requested due to automatic review settings February 24, 2026 03:44
@github-actions github-actions Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 24, 2026
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

This PR fixes a critical bug in the cDAC's DebugInfo contract where GetILAddressMap and GetILOffsetsByAddress returned incorrect error codes for methods without debug metadata (e.g., ILStubs). The fix changes GetMethodNativeMap to return null instead of an empty sequence when no debug info exists, matching the legacy DAC's E_FAIL behavior. Additionally, the PR adds comprehensive dump-based integration tests for P/Invoke scenarios and introduces test infrastructure for OS-aware test skipping.

Changes:

  • Modified IDebugInfo.GetMethodNativeMap to return nullable IEnumerable<OffsetMapping>? to distinguish "no debug info" (null → E_FAIL) from "debug info exists but empty" (empty sequence → E_NOINTERFACE)
  • Added OS-aware test infrastructure (DumpInfo, SkipOnOSAttribute) enabling platform-specific test skipping
  • Added two new dump-based test suites for P/Invoke scenarios (VarargPInvoke and PInvokeStub) with Windows-only debuggees

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/IDebugInfo.cs Changed return type to nullable and added documentation for null semantics
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/DebugInfo/DebugInfo_1.cs Added null check for debugInfo pointer, returns null when debug info doesn't exist
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/DebugInfo/DebugInfo_2.cs Added null check for debugInfo pointer, returns null when debug info doesn't exist
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/ClrDataMethodInstance.cs Updated to handle null return from GetMethodNativeMap and throw E_FAIL
docs/design/datacontracts/DebugInfo.md Updated contract documentation to explain null vs empty sequence semantics
src/native/managed/cdac/tests/DumpTests/DumpInfo.cs New metadata class for OS/arch information stored in dump-info.json
src/native/managed/cdac/tests/DumpTests/SkipOnOSAttribute.cs New attribute for OS-based test skipping with include-only and exclude modes
src/native/managed/cdac/tests/DumpTests/DumpTestBase.cs Updated to load dump metadata and evaluate SkipOnOS attributes
src/native/managed/cdac/tests/DumpTests/DumpTestHelpers.cs Generalized FindFailFastThread to FindThreadWithMethod for reusability
src/native/managed/cdac/tests/DumpTests/DumpTests.targets Added MSBuild target to generate dump-info.json during dump creation
src/native/managed/cdac/tests/DumpTests/RuntimeInfoDumpTests.cs Enhanced tests to validate against dump metadata instead of just enum validity
src/native/managed/cdac/tests/DumpTests/VarargPInvokeDumpTests.cs New test suite for vararg P/Invoke stack walking and ILStub handling
src/native/managed/cdac/tests/DumpTests/PInvokeStubDumpTests.cs New test suite for SetLastError P/Invoke with ILStub frames
src/native/managed/cdac/tests/DumpTests/Debuggees/VarargPInvoke/Program.cs Debuggee that crashes in sprintf vararg call to test VarargPInvokeStub
src/native/managed/cdac/tests/DumpTests/Debuggees/VarargPInvoke/VarargPInvoke.csproj Project configuration for VarargPInvoke debuggee
src/native/managed/cdac/tests/DumpTests/Debuggees/PInvokeStub/Program.cs Debuggee that crashes in memcpy to test ILStub with SetLastError
src/native/managed/cdac/tests/DumpTests/Debuggees/PInvokeStub/PInvokeStub.csproj Project configuration for PInvokeStub debuggee
src/native/managed/cdac/tests/DumpTests/Microsoft.Diagnostics.DataContractReader.DumpTests.csproj Added HResults.cs link and Legacy project reference
src/native/managed/cdac/tests/DumpTests/README.md Updated documentation with OS-based skipping and new debuggees

@max-charlamb max-charlamb added area-Diagnostics-coreclr and removed area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI labels Feb 24, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

Copy link
Copy Markdown
Member

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

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

LGTM modulo one API suggestion there

Comment thread docs/design/datacontracts/DebugInfo.md Outdated
@max-charlamb max-charlamb merged commit 0fe50ea into dotnet:main Feb 25, 2026
53 of 55 checks passed
@max-charlamb max-charlamb deleted the cdac-debuginfo-errorcode-fix branch February 25, 2026 17:58
iremyux pushed a commit to iremyux/dotnet-runtime that referenced this pull request Mar 2, 2026
…nd add P/Invoke dump tests (dotnet#124783)

## Summary

Fix `GetILAddressMap` and `GetILOffsetsByAddress` in the cDAC to return
`E_FAIL` (matching the legacy DAC) when a method has no debug info, and
add dump-based integration tests exercising ILStub and VarargPInvoke
stack frames.

## Problem

ILStubs are JIT-compiled but the JIT does not generate debug metadata
for them — their `RealCodeHeader.DebugInfo` pointer is null. When SOS
commands like `!clru -il` call `GetILAddressMap` on an ILStub:

- **Legacy DAC**: `ClrDataAccess::GetMethodNativeMap` calls
`DebugInfoManager::GetBoundariesAndVars`, which returns `FALSE` ->
returns `E_FAIL` (0x80004005). This propagates through `GetILAddressMap`
without ever reaching the `E_NOINTERFACE` path.
- **cDAC (before this fix)**: `DebugInfo_1/2.GetMethodNativeMap`
attempted to read from the null debug info pointer ->
`VirtualReadException` (0x80131c49) escaped through `catch (Exception
ex) { hr = ex.HResult; }`, producing an HResult that doesn't match the
DAC.

This caused `Debug.Assert(hrLocal == hr)` failures in CI when running
SOS tests against the cDAC.

## Fix

### Contract change: `HasDebugInfo` API and non-nullable
`GetMethodNativeMap`

The DAC has two distinct failure paths for empty/missing debug info:

| Scenario | DAC behavior | HResult |
|----------|-------------|---------|
| No debug info exists (ILStubs) | `GetBoundariesAndVars` returns
`FALSE` | `E_FAIL` (0x80004005) |
| Debug info exists, zero entries | `numMap == 0` after successful
retrieval | `E_NOINTERFACE` (0x80004002) |

To avoid having a nullable return on `GetMethodNativeMap` (where `null`
vs empty is a subtle distinction), the fix adds a new `bool
HasDebugInfo(TargetCodePointer pCode)` API to the `IDebugInfo` contract.
This lets callers explicitly check for the existence of debug info
before calling `GetMethodNativeMap`, which always returns a non-nullable
`IEnumerable<OffsetMapping>` (empty when no debug info exists).

In `ClrDataMethodInstance`, both `GetILOffsetsByAddress` and
`GetILAddressMap` call `HasDebugInfo` first and throw `E_FAIL` when it
returns `false`, matching the legacy DAC behavior.

## New dump tests

### Test infrastructure

- **`DumpInfo`** — Metadata class that records OS/arch in
`dump-info.json` alongside dumps, enabling platform-aware test skipping.
- **`SkipOnOSAttribute`** — `[SkipOnOS(IncludeOnly = "windows")]` skips
tests when the dump wasn't generated on the specified OS. Supports both
exclude and include-only modes.
- **`DumpTests.targets`** — MSBuild target that auto-generates
`dump-info.json` during dump creation.

### Debuggees

- **`VarargPInvoke`** — Calls `sprintf` via `__arglist`, triggering the
`VarargPInvokeStub` assembly thunk path. Crashes inside native code so
the stub frame is on the stack.
- **`PInvokeStub`** — Uses `SetLastError=true` on a P/Invoke to force an
ILStub `DynamicMethodDesc`. Crashes inside `memcpy` with null args.
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants