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
The stdcall convention currently generated by the rewriter does not default to the correct platform convention under Mono, while it does work on CoreCLR (e.g. stdcall works on Linux even though it shouldn't).
The solution could be to either change the calling convention to unmanaged which should work everywhere.
If performance is a concern, we could create a specialized dll in the Nuget package that gets used for Android.
The text was updated successfully, but these errors were encountered:
The solution could be to either change the calling convention to unmanaged which should work everywhere.
What do you mean by unmanaged here? AFAIK (and it's been a while since I worked with the IL rewriter), these are the available calling conventions. They're modeled slightly differently in Mono.Cecil but they seem more or less the same.
Right, I was looking at a decompilation produced by the rewriter, so you may not have been aware of function pointers in net5 as the source code has no mention of the modern C# function pointers.
Seems that the IL rewriter produced something that Mono did not consume correctly in net6.
Quoting from the C# discord; "unmanaged is "platform default" and that's stdcall on Windows and cdecl elsewhere".
Written either like delegate* unmanaged[CallConv]<T1, T2, ...> or delegate* unmanaged<T1, T2, ...>.
The
stdcall
convention currently generated by the rewriter does not default to the correct platform convention under Mono, while it does work on CoreCLR (e.g.stdcall
works on Linux even though it shouldn't).The solution could be to either change the calling convention to
unmanaged
which should work everywhere.If performance is a concern, we could create a specialized dll in the Nuget package that gets used for Android.
The text was updated successfully, but these errors were encountered: