Skip to content

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

503 package errors are https://github.com/dotnet/core-eng/issues/13691

@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