Description
.NET 8 preview 4 seems to have a regression that ICorDebugGCReferenceEnum.Next is no longer returning stack references
Reproduction Steps
- Create the following program
- Using Visual Studio, set a breakpoint where indicated
- When the breakpoint is hit, take a heap snapshot from the Diagnostics tools window
- View the snapshot
class MyStringHolder
{
public readonly string Value;
public MyStringHolder(string value)
{
Value = value;
}
}
class Program
{
public static void Main()
{
var bigString = new MyStringHolder(new string('*', 1000000));
Console.WriteLine(bigString.Value.Length); // breakpoint here
}
}
Expected behavior
'MyStringHolder' should be shown as having the largest inclusive size
Actual behavior
ICorDebugGCReferenceEnum.Next is not returning values for all of the stack variables (references with type CorReferenceStack). I see some from the hot reload thread, but none from the 'Main' function.
Regression?
This worked correctly in .NET 8 preview 3
Known Workarounds
No response
Configuration
I am testing with .NET 8 preview 4 on Windows. Both x86 and x64. I didn't test any other architecture or OS.
Other information
No response
Description
.NET 8 preview 4 seems to have a regression that ICorDebugGCReferenceEnum.Next is no longer returning stack references
Reproduction Steps
Expected behavior
'MyStringHolder' should be shown as having the largest inclusive size
Actual behavior
ICorDebugGCReferenceEnum.Nextis not returning values for all of the stack variables (references with typeCorReferenceStack). I see some from the hot reload thread, but none from the 'Main' function.Regression?
This worked correctly in .NET 8 preview 3
Known Workarounds
No response
Configuration
I am testing with .NET 8 preview 4 on Windows. Both x86 and x64. I didn't test any other architecture or OS.
Other information
No response