Repro:
using System;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
[assembly: DisableRuntimeMarshallingAttribute]
object o = new MyStruct[10];
GCHandle h = GCHandle.Alloc(o, GCHandleType.Pinned);
struct MyStruct
{
char c;
}
Actual result: System.ArgumentException: Object contains non-primitive or non-blittable data.
Expected result: No exceptions