Skip to content

Pretty printing of stackoverflow stacktrace does not always work #118218

@jkotas

Description

@jkotas

Repro

Compiler and run on .NET 10:

M(1);

void M(int x)
{
   Console.WriteLine(x);
   M(x+1);
   Console.WriteLine(x);
}

Actual result

Very long stacktrace with at Program.<<Main>$>g__M|0_0(Int32) repeated thousands of time

Expected result

The repeating part of the stacktrace is eliminated, like:

Stack overflow.
....
Repeated 24121 times:
--------------------------------
   at Program.<<Main>$>g__M|0_0(Int32)
--------------------------------
   at Program.<Main>$(System.String[])

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions