-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NativeAOT] Fix MD array GC series #86877
Conversation
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue Detailsneed to figure how to make a test for this
|
@@ -550,7 +550,7 @@ private static unsafe int CreateArrayGCDesc(LowLevelList<bool> bitfield, int ran | |||
{ | |||
if (numSeries > 0) | |||
{ | |||
*ptr-- = (short)((bitfield.Count - last + baseOffset - 2) * IntPtr.Size); | |||
*ptr-- = (short)((i - last) * IntPtr.Size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
baseOffset
is not a factor in computing the last "skip" in a GC series element. It should be just
the end of the element - offset of the last GC pointer.
For SZ arrays the baseOffset
is 2
, so adding baseOffset - 2
was harmless.
In MD array it results in incorrect "skip".
...coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/EETypeCreator.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
…untime/TypeLoader/EETypeCreator.cs Co-authored-by: Jan Kotas <jkotas@microsoft.com>
this was triggering GC asserts and test failures in a side project.
turns out it s not GC’s fault