Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Fix GC reproting for by-ref-like structs #16231

Merged
merged 3 commits into from
Feb 6, 2018
Merged

Conversation

kouvel
Copy link
Member

@kouvel kouvel commented Feb 6, 2018

Fixes https://github.com/dotnet/coreclr/issues/16044:

@kouvel kouvel added this to the 2.1.0 milestone Feb 6, 2018
@kouvel kouvel self-assigned this Feb 6, 2018
@kouvel kouvel force-pushed the SpanFix branch 3 times, most recently from 4992787 to 3e0dc5a Compare February 6, 2018 08:00
Fixes https://github.com/dotnet/coreclr/issues/16044:
- Divide by pointer size was removed to produce the proper offset
- Fixed some assertion failures seen in https://github.com/dotnet/coreclr/issues/16229
@@ -389,7 +389,7 @@ inline void FindByRefPointerOffsetsInByRefLikeObject(PTR_MethodTable pMT, SIZE_T
continue;
}

SIZE_T fieldStartIndex = pFD->GetOffset() / sizeof(void *);
SIZE_T fieldStartIndex = pFD->GetOffset();
Copy link
Member

Choose a reason for hiding this comment

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

Nit: This is offset not index.

It can be just used directly on next line without being stored into a local field:
FindByRefPointerOffsetsInByRefLikeObject(pFieldMT, baseOffset + pFD->GetFieldOffset(), processPointerOffset);

@kouvel kouvel merged commit e15f90f into dotnet:master Feb 6, 2018
@kouvel kouvel deleted the SpanFix branch February 6, 2018 23:59
kouvel added a commit to kouvel/coreclr that referenced this pull request Feb 10, 2018
Port of a portion of dotnet#16231 to release/2.1.

Fixes https://github.com/dotnet/coreclr/issues/16044:
- Divide by pointer size was removed to produce the proper offset
jkotas pushed a commit that referenced this pull request Feb 10, 2018
Port of a portion of #16231 to release/2.1.

Fixes https://github.com/dotnet/coreclr/issues/16044:
- Divide by pointer size was removed to produce the proper offset
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Fix GC reproting for by-ref-like structs

Fixes https://github.com/dotnet/coreclr/issues/16044:
- Divide by pointer size was removed to produce the proper offset
- Fixed some assertion failures seen in https://github.com/dotnet/coreclr/issues/16229

Commit migrated from dotnet/coreclr@e15f90f
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants