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

Fix all runtime IL generation paths from passing GC types to unmanaged function calls. #35026

Merged
2 commits merged into from
Apr 18, 2020

Conversation

AaronRobinsonMSFT
Copy link
Member

@AaronRobinsonMSFT AaronRobinsonMSFT commented Apr 15, 2020

Fixes #34279

Update: The assert added in this PR impacts more than first thought. When a P/Invoke, call in IL, is inlined any native arguments must be converted (conv.i/conv.u) prior to the call since the IL marshaler fixes in this PR won't run. See #35187 for an example.

/cc @jkoritzinsky @elinor-fung @jkotas @AndyAyersMS

@AaronRobinsonMSFT AaronRobinsonMSFT force-pushed the runtime_34279 branch 2 times, most recently from 1e43992 to 8d6f00f Compare April 16, 2020 22:54
@AaronRobinsonMSFT
Copy link
Member Author

@davidwrighton and @MichalStrehovsky for crossgen2 changes.

@ghost
Copy link

ghost commented Apr 17, 2020

Hello @AaronRobinsonMSFT!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@AaronRobinsonMSFT
Copy link
Member Author

Le sigh... Dynamic runtime IDispatch::Invoke() support 😞

@AaronRobinsonMSFT AaronRobinsonMSFT changed the title Fix IL Stub generators from passing GC types to unmanaged function calls. Fix all runtime IL generation paths from passing GC types to unmanaged function calls. Apr 17, 2020
@AaronRobinsonMSFT
Copy link
Member Author

... and IJW ...

Also it looks like during the switch over to SDK test projects we inadvertently disabled all native COM client tests for consuming managed COM servers. I am re-enabling them in this PR but will rebase when I merge so the two commits exist.

@AaronRobinsonMSFT
Copy link
Member Author

... and WinRT ...

Update crossgen2 IL stub generators.
Update Dynamic runtime stub generator.
Add assert for GC types in unmanaged function calls.
@ghost ghost merged commit ddd458e into dotnet:master Apr 18, 2020
@AaronRobinsonMSFT AaronRobinsonMSFT deleted the runtime_34279 branch April 18, 2020 03:50
This pull request was closed.
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.

AV in WKS::gc_heap::relocate_address
5 participants