-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
area-TypeSystem-coreclrin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is mergedruntime-coreclrspecific to the CoreCLR runtimespecific to the CoreCLR runtime
Milestone
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.
Metadata
Metadata
Assignees
Labels
area-TypeSystem-coreclrin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is mergedruntime-coreclrspecific to the CoreCLR runtimespecific to the CoreCLR runtime