RyuJIT StackOverflowException while using System.Numerics
Here is a minimal repro of the issue I have found in RyuJit. It throws StackOverflowException on following code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Foo(Matrix4x4.Identity);
}
private static unsafe void Foo(Matrix4x4 m)
{
byte* buffer = stackalloc byte[16]; //any number really, not only 16
m.Translation = new Vector3(0, 0, 0);
}
}
}
Compiled on DesktopCLR .NET 4.6 x64 with optiomizations enabled (debug builds do not throw) and /unsafe.
@CarolEidt
@ghord - I am able to reproduce this - thanks for the short repro! Could you file an issue on Connect as well? http://connect.microsoft.com/VisualStudio
Sure. Here is a link to the issue: https://connect.microsoft.com/VisualStudio/feedback/details/1635506
@CarolEidt - this bug is fixed and can be closed?
Yes, it was fixed in the CodeGen branch and migrated along with the other changes on December 11, https://github.com/dotnet/coreclr/commit/121d095ed0b0076fb1c7ff59e6446fd19d506b32
Hi.
Can you tell me, when this will be available via Windows update for client/servers operating systems? It is kind of hard to check out how all the current issues get to production/rollout.
kind regards
Sorry to bother you but is this problem fixed with .NET 4.6.1 ?
kind regards
Yes, this is fixed with .NET 4.6.1. Sorry for the delay in response.