Repository navigation
Closed
Labels
arch-wasmWebAssembly architecturearea-Codegen-AOT-monodisabled-testThe test is disabled in source code against the issueos-browserBrowser variant of arch-wasmwasm-aot-testWebAssembly AOT Test
Milestone
Description
Simplest repro is AOT build of
Activator.CreateInstance(typeof(Queue), new[] { new List<Nullable<Int128>>(){0,null} });Originally from NumberHandlingTestsDynamic.Number_AsCollectionElement_RoundTrip
runtime/src/libraries/System.Text.Json/tests/Common/NumberHandlingTests.cs
Lines 581 to 582 in 0be1d88
| obj = Activator.CreateInstance(type, new[] { list }); | |
| serialized = await Serializer.SerializeWrapper(obj, s_optionReadAndWriteFromStr); |
[21:25:54] fail: MONO_WASM: null function or function signature mismatch
RuntimeError: null function or function signature mismatch
at aot_instances_aot_wrapper_gsharedvt_out_sig_obj_cl4c_Mono_dValueTuple_602_3cbyte_2c_20Mono_dValueTuple_602_3clong_2c_20long_3e_3e_ (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[64734]:0x12547d4)
at corlib_System_Collections_Generic_List_1_Enumerator_T_GSHAREDVT_System_Collections_IEnumerator_get_Current (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[41067]:0xa76714)
at ut_corlib_System_Collections_Generic_List_1_Enumerator_T_GSHAREDVT_System_Collections_IEnumerator_get_Current (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[41068]:0xa76763)
at System_Collections_NonGeneric_System_Collections_Queue__ctor_System_Collections_ICollection (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[10716]:0x36f692)
at JsonSchema_Net_aot_wrapper_gsharedvt_out_sig_void_this_obj (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[1405]:0xe20e9)
at jit_call_cb (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[90080]:0x187fb43)
at mono_llvm_cpp_catch_exception (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[93365]:0x1972bf1)
at mono_llvm_catch_exception (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[93417]:0x1977254)
at do_jit_call (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[90000]:0x187c659)
at mono_interp_exec_method (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[89995]:0x187bb1a)
at interp_entry (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[90074]:0x187f7cc)
at interp_entry_static_ret_2 (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[90103]:0x1880733)
at aot_instances_aot_wrapper_gsharedvt_in_sig_obj_objcl40_Mono_dValueTuple_601_3cMono_dValueTuple_602_3cint_2c_20int_3e_3e_ (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[64696]:0x1252fd9)
at corlib_wrapper_delegate_invoke__Module_invoke_object_object_Span_1_object_object_System_Span_1_object (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[41567]:0xa9241f)
at corlib_System_Reflection_MethodBaseInvoker_InvokeWithOneArg_object_System_Reflection_BindingFlags_System_Reflection_Binder_object___System_Globalization_CultureInfo (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[36414]:0x95b605)
at corlib_System_Reflection_RuntimeConstructorInfo_Invoke_System_Reflection_BindingFlags_System_Reflection_Binder_object___System_Globalization_CultureInfo (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[36560]:0x963d60)
at corlib_System_RuntimeType_CreateInstanceImpl_System_Reflection_BindingFlags_System_Reflection_Binder_object___System_Globalization_CultureInfo (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[25239]:0x794d42)
at corlib_System_Activator_CreateInstance_System_Type_System_Reflection_BindingFlags_System_Reflection_Binder_object___System_Globalization_CultureInfo_object__ (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[25970]:0x7b916a)
at corlib_System_Activator_CreateInstance_System_Type_object__ (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[25971]:0x7b91af)
at aot_instances_aot_wrapper_gsharedvt_out_sig_obj_objobj (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[64654]:0x1252284)
at jit_call_cb (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[90080]:0x187fb5b)
at mono_llvm_cpp_catch_exception (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[93365]:0x1972bf1)
at mono_llvm_catch_exception (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[93417]:0x1977254)
at do_jit_call (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[90000]:0x187c659)
at mono_interp_exec_method (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[89995]:0x186f460)
at interp_entry (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[90074]:0x187f7cc)
at interp_entry_instance_0 (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[90092]:0x188030a)
at aot_instances_aot_wrapper_gsharedvt_in_sig_void_this_ (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[64620]:0x12503b0)
at corlib_System_Runtime_CompilerServices_AsyncMethodBuilderCore_Start_TStateMachine_GSHAREDVT_TStateMachine_GSHAREDVT_ (http://127.0.0.1:44947/_framework/dotnet.native.wasm:wasm-function[40516]:0xa5f42d)
#66220 may be related
Metadata
Metadata
Assignees
Labels
arch-wasmWebAssembly architecturearea-Codegen-AOT-monodisabled-testThe test is disabled in source code against the issueos-browserBrowser variant of arch-wasmwasm-aot-testWebAssembly AOT Test
Activity
dotnet-policy-service commentedon Aug 27, 2025
Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.
pavelsavara commentedon Aug 27, 2025
pavelsavara commentedon Aug 27, 2025
active issue dotnet#119143
pavelsavara commentedon Aug 27, 2025
I though that this is because AOT doesn't have visibility for the call, because we use reflection to call the constructor.
So I prefixed it direct call, to make sure it's not trimmed and it's AOT generated. But it didn't help.
This doesn't reproduce it either.
Right now I think we need something like code below, but for combination of generic and non-generic collections/enumerables.
runtime/src/mono/mono/mini/aot-compiler.c
Lines 5824 to 5828 in 0be1d88
Re-enable the #119143 browser regression test
[mono][wasm][AOT] Generate gsharedvt out-sig wrappers for Nullable<T>…
[mono][wasm][AOT] Generate gsharedvt out-sig wrappers for Nullable<T>…