Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

[x86/Linux] Corretly pop args after unmanaged function call#11007

Merged
BruceForstall merged 2 commits intodotnet:masterfrom
parjong:fix/x86_pinvoke_callconv
Apr 19, 2017
Merged

[x86/Linux] Corretly pop args after unmanaged function call#11007
BruceForstall merged 2 commits intodotnet:masterfrom
parjong:fix/x86_pinvoke_callconv

Conversation

@parjong
Copy link

@parjong parjong commented Apr 17, 2017

In CodeGen::genCallInstruction, call->callSig may be incorrect for direct unmanaged calls, which results in #11006.

This commit suppresses calling convention inference for unmanaged calls to fix #11006.

This commit also resolves signature mismatch in HFA tests. hfa_interop.cs declares each native function explicitly as stdcall. Unfortunately, hfa_native.h (and hfa_native.cpp) does not specify calling convention, and thus the corresponding functions use cdecl.

@danmoseley
Copy link
Member

retest

@parjong
Copy link
Author

parjong commented Apr 18, 2017

@janvorli @BruceForstall Please take a look.

@janvorli
Copy link
Member

@parjong I'll let @BruceForstall review this. I don't understand JIT well enough to understand why "CodeGen::genCallInstruction, call->callSig may be incorrect for direct unmanaged calls".

@parjong
Copy link
Author

parjong commented Apr 19, 2017

@janvorli I notice that this PR is solely about JIT only after your comment. Sorry for disturbing you.

@BruceForstall BruceForstall self-requested a review April 19, 2017 19:25
@BruceForstall
Copy link

cc @dotnet/jit-contrib

@BruceForstall BruceForstall merged commit de5383b into dotnet:master Apr 19, 2017
@parjong parjong deleted the fix/x86_pinvoke_callconv branch April 19, 2017 23:21
@karelz karelz modified the milestone: 2.0.0 Aug 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[x86/Linux] Interop.PrimitiveMarshalling.UIntPtr.PInvokeUIntPtrTest failure (in Checked build)

6 participants