Skip to content

Commit

Permalink
[compiler-rt][asan|win] Fix flaky unittest due to large allocations
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bergeret committed Feb 14, 2017
1 parent 4b5315f commit 0ce53e4
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -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;
Expand Down

0 comments on commit 0ce53e4

Please sign in to comment.