Change __lsan::kMaxAllowedMallocSize literal types to unsigned long long
authorClemens Wasser <clemens.wasser@gmail.com>
Tue, 7 Dec 2021 18:27:59 +0000 (10:27 -0800)
committerVitaly Buka <vitalybuka@google.com>
Tue, 7 Dec 2021 18:38:13 +0000 (10:38 -0800)
commit33e3554ea33d98f476f5d5a6fb85472d5dccfe18
treeda8b3e0dc2a0710d5d456e4fbf0a45bcfc36b289
parentd298c324075e8059687314c46d996a6b580d2257
Change __lsan::kMaxAllowedMallocSize literal types to unsigned long long

It is required for the [Leak Sanitizer port to Windows](https://reviews.llvm.org/D115103).
The currently used `unsigned long` type is 64 bits wide on UNIX like systems but only 32 bits wide on Windows.
Because of that, the literal `8UL << 30` causes an integer overflow on Windows.
By changing the type of the literals to `unsigned long long`, we have consistent behavior and no overflows on all Platforms.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D115186
compiler-rt/lib/lsan/lsan_allocator.cpp