Closed TheSpydog closed 2 years ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
Tagging subscribers to 'arch-wasm': @lewing See info in area-owners.md if you want to be subscribed.
Author: | TheSpydog |
---|---|
Assignees: | - |
Labels: | `arch-wasm`, `untriaged` |
Milestone: | - |
Tagging subscribers to this area: @brzvlad See info in area-owners.md if you want to be subscribed.
Author: | TheSpydog |
---|---|
Assignees: | - |
Labels: | `arch-wasm`, `untriaged`, `area-Codegen-Interpreter-mono` |
Milestone: | - |
cc @BrzVlad @vargaz
Will this eventually be solved at compile time?
I just hit a roadblock on a project where a simple signature (IDD
) is not available.
Is forking and editing wasm_m2n_invoke.g.h really the only way to go here?
Description
I'm attempting to run a basic FNA app with the interpreter mode of BlazorWebAssembly, and it almost works, except for one particular PInvoke call, which produces an error. When running in AOT mode, the program runs correctly.
Reproduction Steps
I have isolated the problematic PInvoke call and written a small sample project to demonstrate the bug. Clone the repo, run
dotnet publish
without any changes, then open the page on a local server to see the error appear. If you change the .csproj so that RunAOTCompilation is true, then running the page will print "Survived!" instead.Expected behavior
In both Interp and AOT modes, the program should print "Survived!" with no errors.
Actual behavior
This error appears in the browser console:
Regression?
Probably not, given that NativeFileReference is new to RC2.
Known Workarounds
None that I have found.
Configuration
.NET Version: .NET 6 rc2 OS: Windows 10 x64 Browsers: Chrome, Firefox
Other information
The file/line that the error points to is this: https://github.com/dotnet/runtime/blob/main/src/mono/mono/mini/aot-runtime-wasm.c#L113, which seems to imply this error is "CANNOT HANDLE INTERP ICALL SIG". (I don't know why this string isn't printed to the console, it would be helpful information.)