Uh oh!
There was an error while loading. Please reload this page.
Free LOADERHANDLEDispatchMemberInfo dtor - #77554
Conversation
This is a regression from NETFX with the introduction of collectable assemblies in .NET Core 3.1 (dotnet/coreclr#20919).
AaronRobinsonMSFT
commented
Oct 27, 2022
/cc @dotnet/interop-contrib |
janvorli
left a comment
There was a problem hiding this comment.
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.
AaronRobinsonMSFT
commented
Oct 27, 2022
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3341033443 |
janvorli
commented
Dec 13, 2022
@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 |
AaronRobinsonMSFT
commented
Dec 13, 2022
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? |
AaronRobinsonMSFT
commented
Dec 13, 2022
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