Commit 8b38c19
authored
Fix unloadability (#58948)
There is a bug in AppDomain::FindAssembly code path that iterates over
the domain assemblies. The iteration loop leaves the refcount of the
LoaderAllocator related to the returned DomainAssembly bumped, but
nothing ever decrements it. So when a code that needs to be unloaded
ends up in that code path, all the managed things like managed
LoaderAllocator, LoaderAllocatorScout are destroyed, but the unloading
doesn't complete due to the refcount.
We have never found it before as this code path is never executed in any
of the coreclr tests even with unloadability testing option.1 parent 91f4366 commit 8b38c19
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3251 | 3251 | | |
3252 | 3252 | | |
3253 | 3253 | | |
3254 | | - | |
3255 | | - | |
| 3254 | + | |
| 3255 | + | |
3256 | 3256 | | |
3257 | 3257 | | |
3258 | 3258 | | |
| |||
0 commit comments