Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
VSadov committed Apr 8, 2021
1 parent d069250 commit 41b1f85
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/coreclr/vm/peimagelayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,12 +419,17 @@ ConvertedImageLayout::ConvertedImageLayout(PEImageLayout* source, BOOL isInBundl

DWORD mapAccess;
DWORD viewAccess;
if (isInBundle && (HasNativeHeader() || HasReadyToRunHeader()))
if (isInBundle && (source->HasNativeHeader() || source->HasReadyToRunHeader()))
{
// in bundle we may want to enable execution if the image contains R2R sections
// so must ensure the mapping is compatible with that
mapAccess = PAGE_EXECUTE_READWRITE;

#if defined(CROSSGEN_COMPILE) || defined(TARGET_UNIX)
viewAccess = FILE_MAP_ALL_ACCESS;
#else
viewAccess = FILE_MAP_EXECUTE | FILE_MAP_WRITE;
#endif
}
else
{
Expand Down

0 comments on commit 41b1f85

Please sign in to comment.