From 0b5f137ab0eea82f59d22da94a0b21f0bc598f16 Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Wed, 10 May 2023 15:36:48 -0700 Subject: [PATCH] [mono][aot] Fix an assert. (#86054) Fixes https://github.com/dotnet/runtime/issues/86052. --- src/mono/mono/mini/aot-compiler.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mono/mono/mini/aot-compiler.c b/src/mono/mono/mini/aot-compiler.c index ab306ab04aa60..c262fc39db3ec 100644 --- a/src/mono/mono/mini/aot-compiler.c +++ b/src/mono/mono/mini/aot-compiler.c @@ -10106,6 +10106,9 @@ append_mangled_wrapper_subtype (GString *s, WrapperSubtype subtype) case WRAPPER_SUBTYPE_LLVM_FUNC: label = "llvm_func"; break; + case WRAPPER_SUBTYPE_NATIVE_FUNC_INDIRECT: + label = "native_func_indirect"; + break; default: g_assert_not_reached (); } @@ -10269,6 +10272,9 @@ append_mangled_wrapper (GString *s, MonoMethod *method) append_sig = FALSE; } else if (info->subtype == WRAPPER_SUBTYPE_NATIVE_FUNC_AOT) { success = success && append_mangled_method (s, info->d.managed_to_native.method); + } else if (info->subtype == WRAPPER_SUBTYPE_NATIVE_FUNC_INDIRECT) { + append_mangled_signature (s, info->d.native_func.sig); + append_sig = FALSE; } else { g_assert (info->subtype == WRAPPER_SUBTYPE_NONE || info->subtype == WRAPPER_SUBTYPE_PINVOKE); success = success && append_mangled_method (s, info->d.managed_to_native.method);