Skip to content

.NET 10 rc2: ICorDebugEval.NewParameterizedArray fails on win-x86 #120848

@gregg-miskelly

Description

@gregg-miskelly

Description

In .NET 10 rc2 on win-x86, using ICorDebugEval.NewParameterizedArray+waiting for the func eval to complete+calling ICorDebugEval.GetResult will fail. GetResult returns CORDBG_E_MODULE_NOT_LOADED. The failure is at this stack:

mscordbi.dll!CordbType::TypeDataToType(CordbAppDomain * pAppDomain, DebuggerIPCE_ExpandedTypeData * data, CordbType * * pRes) Line 1265
                at D:\a\_work\1\s\src\runtime\src\coreclr\debug\di\rstype.cpp(1265)
mscordbi.dll!CordbType::TypeDataToType(CordbAppDomain * pAppDomain, DebuggerIPCE_BasicTypeData * data, CordbType * * pRes) Line 1199
                at D:\a\_work\1\s\src\runtime\src\coreclr\debug\di\rstype.cpp(1199)
mscordbi.dll!CordbType::TypeDataToType(CordbAppDomain * pAppDomain, DebuggerIPCE_ExpandedTypeData * data, CordbType * * pRes) Line 1298
                at D:\a\_work\1\s\src\runtime\src\coreclr\debug\di\rstype.cpp(1298)
mscordbi.dll!CordbEval::GetResult(ICorDebugValue * * ppResult) Line 10555
                at D:\a\_work\1\s\src\runtime\src\coreclr\debug\di\rsthread.cpp(10555)

Reproduction Steps

  1. Create a new C# Console app targeting RC2
  2. Add the below code
  3. Configure the project to run on x86 by setting <RuntimeIdentifier>win-x86</RuntimeIdentifier> and <SelfContained>true</SelfContained>.
  4. Set a breakpoint on the specified line
  5. When the breakpoint hits, attempt to func-eval PrintTypeNames(new Type[] { typeof(Program) })
using System.Diagnostics;

internal class Program
{
    private static void Main(string[] args)
    {
        PrintTypeNames(new Type[] { typeof(Program) }); // breakpoint here
    }

    private static void PrintTypeNames(Type[] types)
    {
        foreach (var item in types)
        {
            Debug.WriteLine(item.Name);
            Console.WriteLine(item.Name);
        }
    }
}

Expected behavior

Func-eval should succeed

Actual behavior

ICorDebugEval.GetResult returns CORDBG_E_MODULE_NOT_LOADED`

Regression?

This is a regression from earlier previews of .NET 10. We have been blocked by other issues getting our tests ported over, so I am not certain which preview.

Known Workarounds

We haven't seen the issue on win-x64

Configuration

This issue repos on win-x86 and does not repro on win-x64. I didn't try any other configuration

Other information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions