summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEtienne Bergeron <etienneb@google.com>2017-02-14 18:57:17 +0000
committerEtienne Bergeron <etienneb@google.com>2017-02-14 18:57:17 +0000
commit0ce53e4b9f9d5ab61acbb05edce4bf56d39ee9ec (patch)
treec2f56b54651cc202a08f6548c352725d3e09408a
parent4b5315f8ac110705ba567ba34e3110f09411e203 (diff)
downloadbcm5719-llvm-0ce53e4b9f9d5ab61acbb05edce4bf56d39ee9ec.tar.gz
bcm5719-llvm-0ce53e4b9f9d5ab61acbb05edce4bf56d39ee9ec.zip
[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
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep.cc b/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep.cc
index 26dc1582aea..e934af3ed97 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep.cc
@@ -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;
OpenPOWER on IntegriCloud