Repository navigation
[wasm][AOT] null function or function signature mismatch - #119143
Copy link
Copy link
Closed
Labels
arch-wasmWebAssembly architectureWebAssembly architecturearea-Codegen-AOT-monodisabled-testThe test is disabled in source code against the issueThe test is disabled in source code against the issueos-browserBrowser variant of arch-wasmBrowser variant of arch-wasmwasm-aot-testWebAssembly AOT TestWebAssembly AOT Test
Milestone
Description
Activity
- addedarch-wasmWebAssembly architectureWebAssembly architecturewasm-aot-testWebAssembly AOT TestWebAssembly AOT Testos-browserBrowser variant of arch-wasmBrowser variant of arch-wasm
on Aug 27, 2025 dotnet-policy-service commented
on Aug 27, 2025 ContributorMore actionsTagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.- addedneeds-area-labelAn area label is needed to ensure this gets routed to the appropriate area ownersAn area label is needed to ensure this gets routed to the appropriate area owners
on Aug 27, 2025 - added and removedneeds-area-labelAn area label is needed to ensure this gets routed to the appropriate area ownersAn area label is needed to ensure this gets routed to the appropriate area owners
on Aug 27, 2025 [MONO] AOT: FOUND method System.RuntimeType:GetConstructors (System.Reflection.BindingFlags) [0x1276 - 0x1277 0x106f98] dotnet.runtime.js:1415 [MONO] AOT: FOUND method System.Buffer:Memmove<T> (T&,T&,uintptr) [0x1169 - 0x116a 0x106f98] dotnet.runtime.js:1415 [MONO] Running class .cctor for System.Collections.Generic.List`1<System.Reflection.MethodBase> from 'System.Private.CoreLib.dll' dotnet.runtime.js:1415 [MONO] AOT: FOUND method System.Collections.Generic.List`1:.cctor () [0x3832 - 0x3833 0x106f98] dotnet.runtime.js:1415 [MONO] AOT: FOUND method System.RuntimeType:IsArrayImpl () [0x12f2 - 0x12f3 0x106f98] dotnet.runtime.js:1415 [MONO] AOT: FOUND method System.DefaultBinder:BindToMethod (System.Reflection.BindingFlags,System.Reflection.MethodBase[],object[]&,System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,string[],object&) [0x1762 - 0x1763 0x106f98] dotnet.runtime.js:1415 [MONO] AOT: FOUND method System.Array:Clone () [0x114e - 0x114f 0x106f98] dotnet.runtime.js:1415 [MONO] AOT: FOUND method System.RuntimeType:IsPrimitiveImpl () [0x12f6 - 0x12f7 0x106f98] dotnet.runtime.js:1415 [MONO] AOT: FOUND method System.RuntimeType:GetTypeCodeImpl () [0x12f0 - 0x12f1 0x106f98] dotnet.runtime.js:1415 [MONO] AOT: FOUND method System.Reflection.RuntimeConstructorInfo:Invoke (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x2f2b - 0x2f2c 0x106f98] dotnet.runtime.js:1415 [MONO] AOT: FOUND method System.RuntimeType:IsInstanceOfType (object) [0x1280 - 0x1281 0x106f98] dotnet.runtime.js:1415 [MONO] AOT: FOUND method System.Collections.Generic.List`1<T_GSHAREDVT>:get_Count () [0x3a43 - 0x3a44 0x106f98] dotnet.runtime.js:1415 [MONO] AOT: FOUND method System.Collections.Generic.List`1<T_GSHAREDVT>:System.Collections.IEnumerable.GetEnumerator () [0x3a4a - 0x3a4b 0x106f98] dotnet.runtime.js:1415 [MONO] AOT NOT FOUND: System.Collections.Generic.List`1<System.Nullable`1<System.Int128>>:System.Collections.Generic.IEnumerable<T>.GetEnumerator (). dotnet.runtime.js:1415 [MONO] AOT: FOUND method (wrapper other) object:gsharedvt_in_sig (intptr) [0x508d - 0x508e 0x106f98] dotnet.runtime.js:1415 [MONO] AOT NOT FOUND: System.Collections.Generic.List`1<System.Nullable`1<System.Int128>>:GetEnumerator (). dotnet.runtime.js:1415 [MONO] AOT: FOUND method (wrapper other) object:gsharedvt_out_sig (intptr,intptr) [0x5053 - 0x5054 0x106f98] dotnet.runtime.js:1415 [MONO] AOT: FOUND method System.Collections.Generic.List`1/Enumerator<T_GSHAREDVT>:.ctor (System.Collections.Generic.List`1<T_GSHAREDVT>) [0x3a50 - 0x3a51 0x106f98] dotnet.runtime.js:1415 [MONO] AOT: FOUND method string:bzero (byte*,int) [0x1338 - 0x1339 0x106f98] dotnet.runtime.js:1415 [MONO] AOT: FOUND method System.Collections.Generic.List`1/Enumerator<T_GSHAREDVT>:MoveNext () [0x3a52 - 0x3a53 0x106f98] dotnet.runtime.js:1415 [MONO] AOT: FOUND method string:memcpy (byte*,byte*,int) [0x1337 - 0x1338 0x106f98] dotnet.runtime.js:1415 [MONO] AOT: FOUND method System.Collections.Generic.List`1/Enumerator<T_GSHAREDVT>:System.Collections.IEnumerator.get_Current () [0x3a53 - 0x3a54 0x106f98] dotnet.runtime.js:1415 [MONO] AOT NOT FOUND: System.Nullable`1<System.Int128>:Box (System.Nullable`1<System.Int128>). dotnet.runtime.js:1415 [MONO] AOT NOT FOUND: (wrapper other) object:gsharedvt_out_sig (intptr,Mono.ValueTuple`2<byte, Mono.ValueTuple`2<long, long>>&,intptr).$mini_get_gsharedvt_wrapper @ mini-generic-sharing.c:2114 $mini_llvmonly_add_method_wrappers @ llvmonly-runtime.c:213 $class_type_info @ mini-generic-sharing.c:1082 $instantiate_info @ mini-generic-sharing.c:2244 $instantiate_info @ mini-generic-sharing.c:2661 $mini_instantiate_gshared_info @ mini-generic-sharing.c:2760 $mini_init_method_rgctx @ jit-icalls.c:1743 $corlib_System_Collections_Generic_List_1_Enumerator_T_GSHAREDVT_System_Collections_IEnumerator_get_Current $ut_corlib_System_Collections_Generic_List_1_Enumerator_T_GSHAREDVT_System_Collections_IEnumerator_get_Current $System_Collections_NonGeneric_System_Collections_Queue__ctor_System_Collections_ICollection- added a commit that references this issue
on 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.
var q = new Queue(new List<Nullable<Int128>>() { 42, null });
This doesn't reproduce it either.
List<Nullable<Int128>> n = new List<Nullable<Int128>>() { 42, null }; foreach (object item in n) { }
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
if (in_corlib && !strcmp (klass_name_space, "System.Collections.Generic") && (!strcmp(klass_name, "ICollection`1") || !strcmp (klass_name, "IEnumerable`1") || !strcmp (klass_name, "IList`1") || !strcmp (klass_name, "IEnumerator`1") || !strcmp (klass_name, "IReadOnlyList`1"))) { MonoClass *tclass = mono_class_from_mono_type_internal (mono_class_get_generic_class (klass)->context.class_inst->type_argv [0]); MonoClass *array_class = mono_class_create_bounded_array (tclass, 1, FALSE); char *name_prefix; - addeddisabled-testThe test is disabled in source code against the issueThe test is disabled in source code against the issue
on Aug 28, 2025 - added a commit that references this issue
on Jul 26, 2026 - locked and limited conversation to collaborators
on Aug 23, 2026
Metadata
Metadata
Assignees
Labels
arch-wasmWebAssembly architectureWebAssembly architecturearea-Codegen-AOT-monodisabled-testThe test is disabled in source code against the issueThe test is disabled in source code against the issueos-browserBrowser variant of arch-wasmBrowser variant of arch-wasmwasm-aot-testWebAssembly AOT TestWebAssembly AOT Test
Simplest repro is AOT build of
Originally from
NumberHandlingTestsDynamic.Number_AsCollectionElement_RoundTripruntime/src/libraries/System.Text.Json/tests/Common/NumberHandlingTests.cs
Lines 581 to 582 in 0be1d88
Log
#66220 may be related