Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look up the ICustomMarshaler implementation methods based on runtime type #55439

Merged
merged 3 commits into from
Jul 12, 2021

Conversation

jkoritzinsky
Copy link
Member

Look up the ICustomMarshaler implementation methods based on the runtime type of the object returned from GetInstance, instead of using the type that was declared in the marshalling info.

These two types can differ, which can cause incorrect methods to be called at runtime if the runtime type has a different vtable layout than the method's parent type.

Contributes to #39606

…ime type of the object returned from GetInstance, instead of using the type that was declared in the marshalling info.

These two types can differ, which can cause incorrect methods to be called at runtime if the runtime type has a different vtable layout than the method's parent type.

Contributes to dotnet#39606
@jkoritzinsky jkoritzinsky added this to the 6.0.0 milestone Jul 9, 2021
@jkoritzinsky jkoritzinsky requested a review from elinor-fung July 9, 2021 23:14
@elinor-fung
Copy link
Member

Can you add a test for this?

@jkoritzinsky
Copy link
Member Author

Some of our tests actually already test this, and just happened to work. I’ll try to add a test that would crash previously.

@jkoritzinsky
Copy link
Member Author

@jkoritzinsky
Copy link
Member Author

Docker failure and Android failure are both network blips.

Merging.

@jkoritzinsky jkoritzinsky merged commit d91e11a into dotnet:main Jul 12, 2021
@jkoritzinsky jkoritzinsky deleted the icustommarshaler-fix branch July 12, 2021 21:47
@ghost ghost locked as resolved and limited conversation to collaborators Aug 11, 2021
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