runtime icon indicating copy to clipboard operation
runtime copied to clipboard

RyuJIT StackOverflowException while using System.Numerics

Open ghord opened this issue 11 years ago • 8 comments

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.

ghord avatar Aug 06 '15 17:08 ghord

@CarolEidt

jkotas avatar Aug 06 '15 17:08 jkotas

@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

CarolEidt avatar Aug 06 '15 18:08 CarolEidt

Sure. Here is a link to the issue: https://connect.microsoft.com/VisualStudio/feedback/details/1635506

ghord avatar Aug 06 '15 18:08 ghord

@CarolEidt - this bug is fixed and can be closed?

sivarv avatar Feb 09 '16 17:02 sivarv

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

CarolEidt avatar Feb 09 '16 17:02 CarolEidt

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

rominator1983 avatar Feb 12 '16 08:02 rominator1983

Sorry to bother you but is this problem fixed with .NET 4.6.1 ?

kind regards

rominator1983 avatar Feb 17 '16 13:02 rominator1983

Yes, this is fixed with .NET 4.6.1. Sorry for the delay in response.

CarolEidt avatar Feb 19 '16 01:02 CarolEidt