Skip to content

Commit 7ca0090

Browse files
zacklj89chencha3
authored andcommitted
[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 57824c0 commit 7ca0090

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)