Skip to content

Commit

Permalink
Fix precondition if HOST_UNIX in ClrVirtualAllocWithinRange()
Browse files Browse the repository at this point in the history
  • Loading branch information
k15tfu committed Mar 28, 2023
1 parent e21b7ea commit adc5cf1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/coreclr/utilcode/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,12 @@ BYTE * ClrVirtualAllocWithinRange(const BYTE *pMinAddr,
{
NOTHROW;
PRECONDITION(dwSize != 0);
PRECONDITION(flAllocationType == MEM_RESERVE); // ORed with MEM_RESERVE_EXECUTABLE on Unix

#ifdef HOST_UNIX
PRECONDITION(flAllocationType == (MEM_RESERVE | MEM_RESERVE_EXECUTABLE));
#else
PRECONDITION(flAllocationType == MEM_RESERVE);
#endif
}
CONTRACTL_END;

Expand Down

0 comments on commit adc5cf1

Please sign in to comment.