In asan on Windows 64-bit, this is one of the broken things

that makes allocation fail. "UL" is 32-bit and shift by 40 will make
the value overflow and become 0.

Patch by Wei Wang

Differential Revision: http://reviews.llvm.org/D21310

llvm-svn: 272689
This commit is contained in:
Etienne Bergeron 2016-06-14 18:05:45 +00:00
parent e17756e0fe
commit 89200ccefa
1 changed files with 1 additions and 1 deletions

View File

@ -223,7 +223,7 @@ void AllocatorOptions::CopyTo(Flags *f, CommonFlags *cf) {
struct Allocator {
static const uptr kMaxAllowedMallocSize =
FIRST_32_SECOND_64(3UL << 30, 1UL << 40);
FIRST_32_SECOND_64(3UL << 30, 1ULL << 40);
static const uptr kMaxThreadLocalQuarantine =
FIRST_32_SECOND_64(1 << 18, 1 << 20);