Skip to content

Problem with shuffle thunks tracking in collectible AssemblyLoaderAllocator #55697

@janvorli

Description

The unloadability features in runtime don't track the lifetime of the shuffle thunks or the related delegate classes (looks like it happens only for delegates pointing to static methods) and when I have attempted to allocate them from the stub heap of the respective collectible loader allocator, they ended up being used after the loader allocator was destroyed and their underlying memory unmapped. That obviously resulted in crashes.

We should figure out how to track then in a way that would keep the loader allocator alive until all the shuffle thunks belonging to that allocator are destroyed.

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions