From 0007abffd3d68d1b6e8bca5f34b907df88217d4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Tue, 24 Jun 2025 07:17:16 -0700 Subject: [PATCH 1/2] Try fixing native AOT outerloop runs --- .../aot/ILCompiler.Compiler/Compiler/TypeMapMetadata.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/TypeMapMetadata.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/TypeMapMetadata.cs index 4d2c597ee2447e..82a97bafd5802b 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/TypeMapMetadata.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/TypeMapMetadata.cs @@ -165,8 +165,13 @@ public static TypeMapMetadata CreateFromAssembly(EcmaAssembly assembly, Compiler continue; } - TypeDesc type = (TypeDesc)currentAssembly.GetObject(attributeType); - + TypeDesc type = (TypeDesc)currentAssembly.GetObject(attributeType, NotFoundBehavior.ReturnNull); + if (type == null) + { + // If the type doesn't resolve, it can't be a type map attribute + continue; + } + TypeMapAttributeKind attrKind = LookupTypeMapType(type); if (attrKind == TypeMapAttributeKind.None) From 7705eb18a75cf22d09acc04d8e711ae471e6665f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Wed, 25 Jun 2025 00:01:52 +0900 Subject: [PATCH 2/2] Update TypeMapMetadata.cs --- .../tools/aot/ILCompiler.Compiler/Compiler/TypeMapMetadata.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/TypeMapMetadata.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/TypeMapMetadata.cs index 82a97bafd5802b..cea9f66e4bb5e0 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/TypeMapMetadata.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/TypeMapMetadata.cs @@ -171,7 +171,7 @@ public static TypeMapMetadata CreateFromAssembly(EcmaAssembly assembly, Compiler // If the type doesn't resolve, it can't be a type map attribute continue; } - + TypeMapAttributeKind attrKind = LookupTypeMapType(type); if (attrKind == TypeMapAttributeKind.None)