Skip to content

Commit 5e97723

Browse files
Fix native aot outerloop (#121541)
Test merging in #121078 caused us to start compiling this test again. We were not compiling it because more than 64k fields hits CodeView limitations in LF_STRUCTURE/LF_CLASS (can't have more than 65534 _introduced fields_). We assert and crash compilation. CoreCLR has it's own limitation of 65535 fields, including inherited, but not counting `object.m_pEEType` (that doesn't exist in CoreCLR CoreLib). This changes the test to not have a class with > 65534 introduced fields. This avoids the CodeView assert. We still don't generate correct CodeView for bigger classes. Not sure if it's worth adding blocking. We could block loading such types but 65534 is an odd number and CodeView is an odd reason. Cc @dotnet/ilc-contrib
1 parent a12ecf9 commit 5e97723

File tree

1 file changed

+7
-7
lines changed
  • src/tests/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b399444

1 file changed

+7
-7
lines changed

src/tests/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b399444/Repro.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class Test
1515
public static int TestEntryPoint()
1616
{
1717
if ((TestManyFields() == 100)
18-
&& (TestManyFieldsPlusOne() == 100))
18+
&& (TestManyFieldsPlusTwo() == 100))
1919
{
2020
return 100;
2121
}
@@ -36,11 +36,11 @@ public static int TestManyFields()
3636
return 100;
3737
}
3838

39-
public static int TestManyFieldsPlusOne()
39+
public static int TestManyFieldsPlusTwo()
4040
{
4141
try
4242
{
43-
TestLdManyFieldsPlusOne();
43+
TestLdManyFieldsPlusTwo();
4444
}
4545
catch (TargetInvocationException)
4646
{
@@ -63,9 +63,9 @@ internal static void TestLdManyFields()
6363
}
6464

6565
[MethodImpl(MethodImplOptions.NoInlining)]
66-
internal static void TestLdManyFieldsPlusOne()
66+
internal static void TestLdManyFieldsPlusTwo()
6767
{
68-
object o = Activator.CreateInstance(typeof(ManyFieldsPlusOne));
68+
object o = Activator.CreateInstance(typeof(ManyFieldsPlusTwo));
6969
}
7070
}
7171

@@ -65605,11 +65605,11 @@ public class ManyFields
6560565605
public int m65532 = 65532;
6560665606
public int m65533 = 65533;
6560765607
public int m65534 = 65534;
65608-
public int m65535 = 65535;
6560965608
}
6561065609

65611-
public class ManyFieldsPlusOne : ManyFields
65610+
public class ManyFieldsPlusTwo : ManyFields
6561265611
{
65612+
public int m65535 = 65535;
6561365613
public int m65536 = 65536;
6561465614
}
6561565615
}

0 commit comments

Comments
 (0)