-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
dotnet/coreclr
#25958Description
The output for the execution of a program may change if you add a breakpoint on a specified line.
Repro Steps:
static void Main(string[] args)
{
Console.WriteLine(WrapDegrees(-722.5f));
Console.WriteLine();
}
private static float WrapDegrees(float degrees)
{
float remainder = Math.Abs(degrees);
remainder %= 360; // breakpoint here
return degrees < 0 ? 360 - remainder : remainder;
}Code from: https://gist.github.com/tannergooding/af91efb30215ab360dfb3fe18e58fe36
- Add breakpoint at specified line;
- Target .NET Core 3.0 Preview 4 for x64;
- Start debugging;
- Hit breakpoint and continue execution.
Expected output
357.5
Actual output
357.51007
Remarks
- If you don't add any breakpoint (or add any breakpoint as long as the specified line does not have a breakpoint), the output will be the same as expected;
- Unable to reproduce the issue with v3.0.0-preview-27122-01 or older versions (regression);
- Unable to reproduce if targeting x86.
Reactions are currently unavailable