From: Zoltan Varga Date: Wed, 21 Aug 2019 18:15:25 +0000 (-0400) Subject: [aot] Simplify a check to avoid calling into the assembly loading code while loading... X-Git-Tag: submit/tizen/20210909.063632~10331^2~5^2~726^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2e9de1db631f75e69fefaedf97768d2301e9453f;p=platform%2Fupstream%2Fdotnet%2Fruntime.git [aot] Simplify a check to avoid calling into the assembly loading code while loading the aot image for corlib. Fixes https://github.com/mono/mono/issues/16380. Commit migrated from https://github.com/mono/mono/commit/c4de19ef097006408bbc52f489ec860b43cf8c17 --- diff --git a/src/mono/mono/mini/aot-runtime.c b/src/mono/mono/mini/aot-runtime.c index c20ed02..35495fe 100644 --- a/src/mono/mono/mini/aot-runtime.c +++ b/src/mono/mono/mini/aot-runtime.c @@ -299,9 +299,7 @@ load_image (MonoAotModule *amodule, int index, MonoError *error) * current AOT module matches the wanted name and guid and just return * the AOT module's assembly. */ - if (mono_asmctx_get_kind (&amodule->assembly->context) == MONO_ASMCTX_INDIVIDUAL && - !strcmp (amodule->assembly->image->guid, amodule->image_guids [index]) && - mono_assembly_names_equal (&amodule->image_names [index], &amodule->assembly->aname)) + if (!strcmp (amodule->assembly->image->guid, amodule->image_guids [index])) assembly = amodule->assembly; else assembly = mono_assembly_load (&amodule->image_names [index], amodule->assembly->basedir, &status);