This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix unloading of images mapped by PAL (#17053)
* Fix unloading of images mapped by PAL The m_FileView member of MappedImageLayout is a CLRMapViewHolder, which runs CLRUnmapViewOfFile on release. This is fine on Windows, where the MappedImageLayout constructor calls CLRMapViewOfFile. However, with FEATURE_PAL, the constructor calls PAL_LOADLoadPEFile, which simulates LoadLibrary and records multiple mapping entries. Each entry increases the refcount of the underlying file handle PAL object. PAL_LOADUnloadPEFile should be called in this case (instead of CLRUnmapViewOfFile), to decrease the refcount for each mapping entry. Fixes https://github.com/dotnet/coreclr/issues/15189. * Fix build failure
- Loading branch information
Showing
3 changed files
with
19 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters