-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
tenet-reliabilityReliability/stability related issue (stress, load problems, etc.)Reliability/stability related issue (stress, load problems, etc.)
Milestone
Description
Happens on full CLR only.
Repro:
using System.Numerics;
namespace VectorRepro
{
public class Program
{
static Vector<byte> _vector = new Vector<byte>(42);
//static Vector<byte> _vector2 = new Vector<byte>(43);
public static void Main(string[] args)
{
}
}
}
Error:
Unhandled Exception: System.TypeInitializationException: The type initializer for 'VectorRepro.Program' threw an exception. ---> System.InvalidProgramException: Common Language Runtime detected an invalid program.
at VectorRepro.Program..cctor()
--- End of inner exception stack trace ---
at VectorRepro.Program.Main(String[] args)
If you uncomment the second static field, no error is thrown.
Other remarks:
- Only seems to happen with
byte. - Also repros if you have multiple static
Vector<byte>s in a class and add a new class containing a single one. That's how we actually found it: ForChunkedEncoding vector as static rather than instance aspnet/KestrelHttpServer#874
Metadata
Metadata
Assignees
Labels
tenet-reliabilityReliability/stability related issue (stress, load problems, etc.)Reliability/stability related issue (stress, load problems, etc.)