Skip to content

Conversation

@MichalStrehovsky
Copy link
Member

  • Fixes a pretty obvious bug in reverse interface marshalling
  • Fixes error case in SafeHandle marshaller. The existing code was trying to generate throwing code in a wrong spot, leaving IL that is difficult to compute stack height for with our naive algorithm. MissingMethodException is the CLR-compatible behavior (see SafeCertContextHandle is missing a default constructor runtime#43016).

* Fixes a pretty obvious bug in reverse interface marshalling
* Fixes error case in `SafeHandle` marshaller. The existing code was trying to generate throwing code in a wrong spot, leaving IL that is difficult to compute stack height for with our naive algorithm. `MissingMethodException` is the CLR-compatible behavior.
@MichalStrehovsky MichalStrehovsky added the area-NativeAOT-coreclr .NET runtime optimized for ahead of time compilation label Oct 4, 2020
new TypeDesc[] {
Context.GetWellKnownType(WellKnownType.String)
});
MethodDesc exceptionCtor = InteropTypes.GetMissingMemberException(Context).GetKnownMethod(".ctor", ctorSignature);
Copy link
Member

Choose a reason for hiding this comment

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

InteropTypes.GetMissingMemberException is no longer used. Delete it?

if (ctor == null || ((MetadataType)ManagedType).IsAbstract)
{
#if READYTORUN
// Let the runtime generate the proper MissingMemberException for this.
Copy link
Member

Choose a reason for hiding this comment

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

Delete this #if READYTORUN?

@MichalStrehovsky MichalStrehovsky merged commit b866f5e into dotnet:feature/NativeAOT Oct 5, 2020
@MichalStrehovsky MichalStrehovsky deleted the marshallers branch October 5, 2020 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-NativeAOT-coreclr .NET runtime optimized for ahead of time compilation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants