Check if the marshalling of a field is possible across all platforms.#53194
Merged
AaronRobinsonMSFT merged 5 commits intodotnet:mainfrom Jun 8, 2021
Merged
Check if the marshalling of a field is possible across all platforms.#53194AaronRobinsonMSFT merged 5 commits intodotnet:mainfrom
AaronRobinsonMSFT merged 5 commits intodotnet:mainfrom
Conversation
Member
Author
|
@jkoritzinsky and @elinor-fung This is a draft PR to see what people think of the fix. It basically makes the x86 and amd64 logic consistent but it is still poor. We also need a test here. |
Member
|
I'd be ok doing the validation like this. Personally, I wish we didn't need to support IClassX-style interface generation at all (especially since tlbexp isn't supported), but there's not much we can do about that. |
Member
Author
This comment has been minimized.
This comment has been minimized.
jkoritzinsky
approved these changes
Jun 8, 2021
elinor-fung
reviewed
Jun 8, 2021
Comment on lines
+1032
to
+1033
| if (info.GetMarshalType() == MarshalInfo::MARSHAL_TYPE_UNKNOWN) | ||
| info.ThrowTypeLoadExceptionForInvalidFieldMarshal(pFD, info.GetErrorResourceId()); |
Member
There was a problem hiding this comment.
Do we have a test for the failure case?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #53110
The x86 code path for field marshalling required inspection of the field earlier than the amd64 code path. This update makes that inspection occur at the same time in both cases. However, the only real change here is that both will fail later on if the field is attempted to be marshalled via the IClassX interface. The entire experience here is poor though.