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

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 14 09:47:01 PST 2017


rnk accepted this revision.
rnk added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lib/sanitizer_common/sanitizer_coverage_libcdep.cc:175-177
+  // On windows, large allocations are often failing which is making unittests
+  // flaky. TODO(etienneb): Find a way to support coverage of larger executable
+  // in 64-bits.
----------------
This comment should document what makes Windows special, and not just "the unittests fail unless we do this". Windows doesn't do overcommit (committed virtual memory costs swap), so programs can't reliably map such large amounts of virtual memory.


================
Comment at: lib/sanitizer_common/sanitizer_coverage_libcdep.cc:180
+#else
   static const uptr kTrEventArrayMaxSize = FIRST_32_SECOND_64(1 << 22, 1 << 30);
+#endif
----------------
I don't think we need the #if:
  static const uptr kTrEventArrayMaxSize =
      (SANITIZER_WORDSIZE == 32 || SANITIZER_WINDOWS) ? 1 << 22 : 1 << 30;



https://reviews.llvm.org/D29945





More information about the llvm-commits mailing list