Skip to content

Fix reverse marshalling of refs to blittable types (#8140)#36119

Merged
jkotas merged 1 commit intodotnet:masterfrom
jkotas:corert-port
May 8, 2020
Merged

Fix reverse marshalling of refs to blittable types (#8140)#36119
jkotas merged 1 commit intodotnet:masterfrom
jkotas:corert-port

Conversation

@jkotas
Copy link
Member

@jkotas jkotas commented May 8, 2020

Hit in selfhosted ilc.exe. In JitInterface we have a couple cases where we do reverse p/invoke with a delegate that has a ref parameter. Sometimes the ref is null (and we don't touch it).

The marshaller was trying to make a copy of the pointed to value, NullRefing in the process because the pointer was null. We don't actually need to make a copy because the value is blittable.

Hit in selfhosted ilc.exe. In JitInterface we have a couple cases where we do reverse p/invoke with a delegate that has a ref parameter. Sometimes the `ref` is null (and we don't touch it).

The marshaller was trying to make a copy of the pointed to value, NullRefing in the process because the pointer was null. We don't actually need to make a copy because the value is blittable.
@jkotas
Copy link
Member Author

jkotas commented May 8, 2020

Port dotnet/corert#8140 to dotnet/runtime

Copy link
Member

@MichalStrehovsky MichalStrehovsky left a comment

Choose a reason for hiding this comment

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

Thank you!

@jkotas jkotas merged commit a17dae5 into dotnet:master May 8, 2020
@jkotas jkotas deleted the corert-port branch May 8, 2020 18:34
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
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.

3 participants