You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mono: correctly handle new 0x09 ("unmanaged") calling convention in metadata #38480
In #38357, a new calling convention value is added to function signatures. Mono should not crash when we see this value in assemblies.
The runtime should basically treat it the same as cdecl on non-Windows platforms (and on Windows for .net 5, too).
When the execution engine sees the calli fsig IL instruction, we will need to look for unmanaged in fsig and do a GC transition around the call.
Next, a modopt on the return type of the signature will encode details of the calling convention #34805
Finally, if the unmanaged calling convention modopts have CallConvSuppressGCTransition as one of the options, we can drop the GC transition around the indirect call.
@BrzVlad - is the last tracking item above " interp - ditto - emit GC transitions around calli instructions with the pinvoke bit set." necessary for 6.0 ?
Activity
[metadata] Initial support for MONO_CALL_UNMANAGED
lambdageek commentedon Jul 8, 2020
An initial attempt is at lambdageek/mono@8684def
need to chase down all the places that look at the calling convention and add a case for this one.
lambdageek commentedon Jul 11, 2020
Related CoreCLR PR #39030
Need to handle, in particular the case where
unmanaged+modoptis different from an existingunmanaged xyzcconv https://github.com/dotnet/runtime/pull/39030/files#r452569548vargaz commentedon Jul 15, 2020
ikvm changes:
mono/mono#20119
vargaz commentedon Jul 15, 2020
monodis prints:
calli signature-0x11000006
for all calli signatures.
marek-safar commentedon Aug 3, 2020
@lambdageek is there anything else to be done?
CoffeeFlux commentedon Aug 10, 2020
I guess the initial work was covered by #38728? So if we're updated in ikdasm and monodis, I guess we're good?
CoffeeFlux commentedon Aug 10, 2020
I'm closing this unless anyone knows of remaining work. The issue's topics seem to be covered. cc: @vargaz
7 remaining items
[Mono][jit] Emit GC transitions for "calli unmanaged" instructions (#…
SamMonoRT commentedon Jul 22, 2021
@BrzVlad - is the last tracking item above " interp - ditto - emit GC transitions around calli instructions with the pinvoke bit set." necessary for 6.0 ?
SamMonoRT commentedon Aug 6, 2021
Assigning to @BrzVlad for the last item