-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Error using double or float values with WebAssembly #67970
Comments
This may be the same error I'm seeing on #67939 |
Not quite the same actually, I'm seeing |
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsDescriptionSeeing a bug when using SQLitePCL.Raw preview and also see the same bug in Steve Sandersons Blaze Orbital sample when using double/float in entity classes. Works fine with decimals! Tried with EF Core and SQLite-net. Reproduction Stepshttps://github.com/mark-cb/BlazorSQLiteWasm Expected behaviorDouble and floats should work the same as decimals. Actual behaviorError: Regression?No response Known WorkaroundsNo response ConfigurationNo response Other information
|
Is it possible to get a full stack trace here? Usually the JS exceptions you're reporting will include a stack below the message + line number |
|
We need to generate so basically we need to change aot-runtime-wasm.c to make three static variables in aot-runtime-wasm.c: static void** interp_to_native_invokes;
static const char **interp_to_native_signatures;
static unsigned int interp_to_native_count; and expose a public API that assigns to those variables: MONO_API void
mono_wasm_install_interp_to_native_invokes (void **invokes, const char **sigs, unsingned int count); so then instead of including then in src/wasm/runtime or src/wasm/build/ or some place we can create a .c and .o file for wasm_m2n_invoke using an MSBuild task. One complication is that MONO_API gpointer*
mono_wasm_interp_method_args_get_iargs (InterpMethodArguments *margs); // returns margs->iargs
MONO_API
gpointer *
mono_wasm_interp_method_args_get_retval (InterpMethodArguments *margs); // returns margs->retval and the generated functions like static void
wasm_invoke_iifi (void *target_func, InterpMethodArguments *margs); will use those methods to get at the elements of the InterpMethodArguments struct static void
wasm_invoke_iifi (void *target_func, InterpMethodArguments *margs)
{
typedef int (*T)(int arg_0, float arg_1, int arg_2);
T func = (T)target_func;
gpointer* iargs = mono_wasm_interp_method_args_get_iargs (margs);
double *fargs = mono_wasm_interp_method_args_get_fargs (margs);
int res = func ((int)(gssize)iargs [0], *(float*)&fargs [0], (int)(gssize)iargs [1]);
gpointer *retval = mono_wasm_interp_method_args_get_retval (margs);
*(int*)retval = res;
} One complication is that the implementation of In the future we should figure out some way for (there is also some utility junk that should probably just be duplicated. Things like the |
Description
Seeing a bug when using SQLitePCL.Raw preview and also see the same bug in Steve Sandersons Blaze Orbital sample when using double/float in entity classes. Works fine with decimals! Tried with EF Core and SQLite-net.
Reproduction Steps
https://github.com/mark-cb/BlazorSQLiteWasm
Expected behavior
Double and floats should work the same as decimals.
Actual behavior
Error:
/__w/1/s/src/mono/mono/mini/aot-runtime-wasm.c:113 /__w/1/s/src/mono/mono/mini/aot-runtime-wasm.c:113
Uncaught ExitStatus
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
ericsink/SQLitePCL.raw#480
The text was updated successfully, but these errors were encountered: