Skip to content

[Mono] Unloadable ALCs. #79711

@lateralusX

Description

@lateralusX

#77399 setup basic support for unloadable ALCs in Mono. This issue tracks remaining work to complete unloadable ALCs on Mono runtime. Initial list of work items is extracted from https://github.com/dotnet/runtime/blob/main/docs/design/mono/unloadability.md#remaining-work:

Must

  • Enable Unloading is currently disabled due to CI failures
  • Managed frames. Frames belonging to code in the ALC should keep the ALC alive. This can be implemented by having all methods allocate a volatile local variable and store a reference to their LoaderAllocator object into it.
  • Reflection pointers. Icalls which take a assembly/type etc. handle as parameter need to keep the ALC alive, otherwise there will be subtle races.
  • TLS variables.
  • Testing and leak detection.
  • Enable/disable compiler flag.

Should

  • Profiling, perf counters.
  • Diagnostics support. What keeps an ALC alive.

Could

  • Boehm GC support.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions