Skip to content

Deoptimization returns different versions of code when R2R is used #92616

@mikelle-rogers

Description

@mikelle-rogers

Description

Stepping into a R2R method while debugging for the first time that does not result in a deoptimized method.

Reproduction Steps

using System.Runtime.CompilerServices;

class Program
{
    [MethodImpl(MethodImplOptions.AggressiveOptimization)]
    static void Main()
    {
        Console.Write(5);
        Console.Write(5);
    }
}

When using a release runtime, step in 4 times, then out 1, then in 2 times

Expected behavior

Should be in the WriteSpan method.

Actual behavior

Ends up in the Flush method instead of the WriteSpan method.

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions