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
Reorg: CallSite emitting does not work as intended #171
Comments
Can you dump the dmd to disk and send it? |
The thing is, there's no problem with il, as far as I can tell. The problem is that runtime tries to use attributes like IsReadOnlyAttribute and NullableAttribute from MonoMod.Utils when calli got invoked. I don't have enough understanding of how runtime works to understand the cause.
EDIT: |
It looks like .NET 8 is failing because of changes in ILGenerator that we never caught. On older runtimes, it looks like there might be an issue with the |
8761d94 seems to fix Framework and Core, but not Mono. Doing some investigation, it seems like Mono just... doesn't implement |
Well, that partially solves the problem. Because based on the changes, original problem has simply shifted. Still happens with reference to |
What's the repro for this new case? |
public static double Fn1() => default; to public static IntPtr Fn1() => default; |
I see. My tests show only |
Oh, indeed, my bad. 0x1A is also missing between |
Related. |
That's a different issue altogether I think. Pre-.NET 8, there are actually no reflection APIs to work with function pointers, and even on .NET 8, they're rather strange. |
Description
Something goes wrong when emitting a CallSite referencing
double
(and possibly more types) on CoreCLR/frameworks. And on mono it crashes during emittingExample
CoreCLR/frameworks
Mono
The text was updated successfully, but these errors were encountered: