The struct below is misclassified by the SystemV classifier:
[StructLayout(LayoutKind.Sequential)]
public unsafe struct FixedBufferClassificationTest
{
public fixed int arr[3];
public float f;
}
The two eightbytes should both be classified as INTEGER eightbytes; however, the runtime sees the type above as equivalent to the following:
[StructLayout(LayoutKind.Sequential)]
public unsafe struct FixedBufferClassificationTest
{
[StructLayout(LayoutKind.Sequential, Size=12)]
private struct FixedBufferType
{
private int i;
}
[FixedBufferAttribute(typeof(int),3)]
public FixedBufferType arr;
public float f;
}
Since the classifier has no special knowledge of the concept of fixed buffers, the classifier marks the first four bytes as INTEGER, the next 8 as NO_CLASS, and the final four as SSE. This results in the second eightbyte being classified as SSE instead of INTEGER.
The struct below is misclassified by the SystemV classifier:
The two eightbytes should both be classified as
INTEGEReightbytes; however, the runtime sees the type above as equivalent to the following:Since the classifier has no special knowledge of the concept of fixed buffers, the classifier marks the first four bytes as
INTEGER, the next 8 asNO_CLASS, and the final four asSSE. This results in the second eightbyte being classified asSSEinstead ofINTEGER.