You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// [COMPAT] For correctness, we can't marshal via pinning if we might need to marshal differently at runtime.
2500
+
// See calls to EmitExactTypeCheck where we check the runtime type of the object being marshalled.
2501
+
// However, we previously supported pinning non-sealed blittable classes, even though that could result
2502
+
// in some data still being unmarshalled if a subclass is provided. This optimization is incorrect,
2503
+
// but libraries like NAudio have taken a hard dependency on this incorrect behavior, so we need to preserve it.
2499
2504
returnIsCLRToNative(m_dwMarshalFlags) &&
2500
2505
!IsByref(m_dwMarshalFlags) &&
2501
-
!IsFieldMarshal(m_dwMarshalFlags) &&
2502
-
m_pargs->m_pMT->IsSealed(); // We can't marshal via pinning if we might need to marshal differently at runtime. See calls to EmitExactTypeCheck where we check the runtime type of the object being marshalled.
0 commit comments