Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adding a test
  • Loading branch information
VSadov committed Mar 22, 2023
commit 9dde94fbdd329cd8508adeeff15ee21a71a2dda9
19 changes: 19 additions & 0 deletions src/tests/Loader/classloader/InlineArray/InlineArrayValid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -364,4 +364,23 @@ public static void Boxed()

BoxedMethodArg(arr);
}

// ====================== GCDescOpt ==========================================================

[Fact]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test will need to be disabled for Mono

public static void GCDescOpt()
{
Console.WriteLine($"{nameof(GCDescOpt)}...");

MyArray<object>[] arr = new MyArray<object>[5];

fixed (void* arrPtr = arr)
{
nint* mtPtr = (nint*)arrPtr - 2;
nint* gcSeriesPtr = (nint*)*mtPtr - 1;

// optimized gc info should have exactly 1 gc series.
Assert.Equal(1, *gcSeriesPtr);
}
}
}