Skip to content

Commit 4b10d1f

Browse files
authored
[compiler-rt] Fixing UB on Windows for trampoline allocations (llvm#85639)
Fixing the type of the constant to avoid undefined behavior with respect to overflow.
1 parent 175ad66 commit 4b10d1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler-rt/lib/interception/interception_win.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ struct TrampolineMemoryRegion {
339339
uptr max_size;
340340
};
341341

342-
UNUSED static const uptr kTrampolineScanLimitRange = 1 << 31; // 2 gig
342+
UNUSED static const uptr kTrampolineScanLimitRange = 1ull << 31; // 2 gig
343343
static const int kMaxTrampolineRegion = 1024;
344344
static TrampolineMemoryRegion TrampolineRegions[kMaxTrampolineRegion];
345345

0 commit comments

Comments
 (0)