[compiler-rt][asan|win] Fix flaky unittest due to large allocations

Summary:
Coverage is using large arrays which requires large allocations.
These allocations are flaky and often failing on win64.

We are using the 32-bits size until this gets a better fix.

Reviewers: rnk

Reviewed By: rnk

Subscribers: llvm-commits, kubamracek, chrisha, dberris

Differential Revision: https://reviews.llvm.org/D29945

llvm-svn: 295086
This commit is contained in:
Etienne Bergeron 2017-02-14 18:57:17 +00:00
parent 4b5315f8ac
commit 0ce53e4b9f
1 changed files with 5 additions and 1 deletions

View File

@ -171,7 +171,11 @@ class CoverageData {
// - not thread-safe;
// - does not support long traces;
// - not tuned for performance.
static const uptr kTrEventArrayMaxSize = FIRST_32_SECOND_64(1 << 22, 1 << 30);
// Windows doesn't do overcommit (committed virtual memory costs swap), so
// programs can't reliably map such large amounts of virtual memory.
// TODO(etienneb): Find a way to support coverage of larger executable
static const uptr kTrEventArrayMaxSize =
(SANITIZER_WORDSIZE == 32 || SANITIZER_WINDOWS) ? 1 << 22 : 1 << 30;
u32 *tr_event_array;
uptr tr_event_array_size;
u32 *tr_event_pointer;