Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Fallback to old behavior when marshaling a non-blittable fixed buffer #20575

Merged

Conversation

jkoritzinsky
Copy link
Member

@jkoritzinsky jkoritzinsky commented Oct 24, 2018

After some offline discussions, we've decided to revert back to the old behavior when marshaling a non-blittable fixed buffer since all alternatives will very likely break someone and we don't get much real benefit out of it.

Also, add an assert for debug and checked builds to we can make sure that we don't try to marshal non-blittable fixed buffers while developing runtime features.

Supercedes #20558, #20263, and #20375

… buffers to/from native instead of on all marshalling operations.
#ifdef _DEBUG
INITFIELDMARSHALER(NFT_NESTEDVALUECLASS, FieldMarshaler_NestedValueClass, (thNestedType.GetMethodTable(), IsFixedBuffer(pfwalk->m_MD, pInternalImport)));
#else

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: extra new line.

@jkoritzinsky
Copy link
Member Author

@dotnet-bot test Ubuntu arm Cross Checked Innerloop Build and Test
@dotnet-bot test Ubuntu16.04 arm64 Cross Checked no_tiered_compilation_innerloop Build and Test

@jkotas jkotas merged commit f7863cf into dotnet:master Oct 25, 2018
A-And pushed a commit to A-And/coreclr that referenced this pull request Nov 20, 2018
…dotnet#20575)

* Throw an exception only when attempting to marshal nonblittable fixed buffers to/from native instead of on all marshalling operations.

* Assert in debug and checked builds when trying to marshal a fixed buffer of a non-blittable type.
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…dotnet/coreclr#20575)

* Throw an exception only when attempting to marshal nonblittable fixed buffers to/from native instead of on all marshalling operations.

* Assert in debug and checked builds when trying to marshal a fixed buffer of a non-blittable type.



Commit migrated from dotnet/coreclr@f7863cf
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants