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

Etienne Bergeron via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 14 10:03:17 PST 2017


etienneb updated this revision to Diff 88393.
etienneb marked 4 inline comments as done.
etienneb added a comment.

rnk comments.


https://reviews.llvm.org/D29945

Files:
  lib/sanitizer_common/sanitizer_coverage_libcdep.cc


Index: lib/sanitizer_common/sanitizer_coverage_libcdep.cc
===================================================================
--- lib/sanitizer_common/sanitizer_coverage_libcdep.cc
+++ lib/sanitizer_common/sanitizer_coverage_libcdep.cc
@@ -171,7 +171,11 @@
   //   - 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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29945.88393.patch
Type: text/x-patch
Size: 862 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170214/90e7ba4a/attachment.bin>


More information about the llvm-commits mailing list