-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Free LOADERHANDLE
DispatchMemberInfo
dtor
#77554
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
Free LOADERHANDLE
DispatchMemberInfo
dtor
#77554
Conversation
This is a regression from NETFX with the introduction of collectable assemblies in .NET Core 3.1 (dotnet/coreclr#20919).
/cc @dotnet/interop-contrib |
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.
LGTM, thank you for fixing it. I don't know how could I miss the handle freeing when making the change that introduced this problem.
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3341033443 |
@AaronRobinsonMSFT I have just found that the freeing of the handle added in this PR causes assert in debug builds / crash in release ones during unloading. The problem is that at the time the runtime/src/coreclr/vm/loaderallocator.cpp Lines 984 to 989 in b33aede
Here is the relevant part of the call stack:
The |
Do we have a test for this? I'm not entirely sure how to fix this without a bit of time. Is this something that needs intimate knowledge of the assembly unloading logic or should I be able to muddle through with a fix? |
Created new issue - #79588 |
This is a regression from NETFX with the introduction of collectable assemblies
for COM scenarios in .NET Core 3.1 (dotnet/coreclr#20919).
Manually verified the user scenario and the references are no longer present.
Fixes #76350