[compiler-rt] Fixing UB on Windows for trampoline allocations (#85639)

Fixing the type of the constant to avoid undefined behavior with respect
to overflow.
This commit is contained in:
Zack Johnson
2024-03-19 09:16:18 -04:00
committed by GitHub
parent 175ad6630a
commit 4b10d1fdd3

View File

@@ -339,7 +339,7 @@ struct TrampolineMemoryRegion {
uptr max_size;
};
UNUSED static const uptr kTrampolineScanLimitRange = 1 << 31; // 2 gig
UNUSED static const uptr kTrampolineScanLimitRange = 1ull << 31; // 2 gig
static const int kMaxTrampolineRegion = 1024;
static TrampolineMemoryRegion TrampolineRegions[kMaxTrampolineRegion];