Skip to content

ICorProfilerCallback.AssemblyUnloadStarted is never called #86178

@kevingosse

Description

@kevingosse

Description

When loading an assembly into an AssemblyLoadContext, the methods AssemblyLoadStarted/AssemblyLoadFinished on ICorProfilerCallback are called as expected. However, when unloading the ALC, AssemblyUnloadStarted is not called (as far as I can tell).

I made extra sure with a debugger that the module was properly unloaded, yet the event is not raised.

I scanned through the code and the event is supposed to be raised by Assembly::StartUnload but it doesn't seem to be called anywhere. Same thing for Module::StartUnload.

Reproduction Steps

  • Write an application that properly unloads an ALC
  • Attach a profiler

Expected behavior

ICorProfilerCallback::AssemblyUnloadStarted should be called.

Actual behavior

ICorProfilerCallback::AssemblyUnloadStarted aren't called.

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions