Closed
Description
From: #95193 (comment)
These silent integer overflows are present in handling of LayoutKind.Sequential as well. For example, this:
Console.WriteLine(sizeof(X));
struct X
{
byte x;
BigArray a;
}
[StructLayout(LayoutKind.Sequential, Size = int.MaxValue)]
struct BigArray
{
}
prints -2147483648.