-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Fix FnPtrTypeDesc::GetManagedClassObject #82325
Conversation
@@ -349,8 +349,7 @@ bool TypeHandle::IsManagedClassObjectPinned() const | |||
{ | |||
LIMITED_METHOD_DAC_CONTRACT; | |||
|
|||
// Function pointers are always mapped to typeof(IntPtr) | |||
return !GetLoaderAllocator()->CanUnload() || IsFnPtrType(); | |||
return !GetLoaderAllocator()->CanUnload(); |
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.
Missed this -- prevents FPs from being moved during GC \ causing GC holes perhaps?
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.
The logic in this method has to be in sync with what GetManagedClassObject returns. If it is not in sync, it will lead to all sorts of problems.
Tagging subscribers to this area: @dotnet/area-system-reflection Issue DetailsThe code was missing support for allocating RuntimeType objects on frozen heap Fixes #82252
|
} | ||
|
||
GCPROTECT_END(); | ||
if (m_hExposedClassObject == NULL) |
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.
I see that this pattern was recently changed to support frozen heaps, so this copy-paste above was stale.
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.
Right
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.
Thanks!
The code was missing support for allocating RuntimeType objects on frozen heap Fixes dotnet#82252
…inters (dotnet#82321)" This reverts commit 473e278.
/azp run runtime-coreclr libraries-jitstress |
Azure Pipelines successfully started running 1 pipeline(s). |
Ouch, thanks! It turns out to be a FOH-related issue indeed 😞 |
The code was missing support for allocating RuntimeType objects on frozen heap
Fixes #82252