-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
arch-wasmWebAssembly architectureWebAssembly architecturearea-Codegen-Interpreter-monodisabled-testThe test is disabled in source code against the issueThe test is disabled in source code against the issue
Milestone
Description
Warning Test.Prepare: Store local stack type mismatch 0 7 from
runtime/src/mono/mono/mini/interp/transform.c
Lines 1073 to 1075 in 30f30a3
| g_warning("%s.%s: Store local stack type mismatch %d %d", | |
| m_class_get_name (td->method->klass), td->method->name, | |
| stack_type [mt], td->sp [-1].type); |
- Put this code in
src/mono/sample/wasm/console-v8-cjs/Program.cs
using System;
using System.Threading.Tasks;
public class Test
{
public static async Task<int> Main(string[] args)
{
await Task.Delay(1);
Prepare();
return 0;
}
public unsafe static int Prepare()
{
delegate*<int> value = &Prepare;
Console.WriteLine ($"value is {value == null}");
return 5;
}
}- build:
make build MSBUILD_ARGS="-p:TreatWarningsAsErrors=false" - make run
Output:
console.debug: mono_wasm_runtime_ready fe00e07a-5519-4dfe-b35a-f867dbaf2e28
[MONO] Test.Prepare: Store local stack type mismatch 0 7
value is False
IIUC,
runtime/src/mono/mono/mini/interp/transform.c
Lines 943 to 951 in 30f30a3
| static int | |
| can_store (int st_value, int vt_value) | |
| { | |
| if (st_value == STACK_TYPE_O || st_value == STACK_TYPE_MP) | |
| st_value = STACK_TYPE_I; | |
| if (vt_value == STACK_TYPE_O || vt_value == STACK_TYPE_MP) | |
| vt_value = STACK_TYPE_I; | |
| return st_value == vt_value; | |
| } |
.. this needs to map STACK_TYPE_F to STACK_TYPE_I too.
Metadata
Metadata
Assignees
Labels
arch-wasmWebAssembly architectureWebAssembly architecturearea-Codegen-Interpreter-monodisabled-testThe test is disabled in source code against the issueThe test is disabled in source code against the issue