Explorar o código

Attempt to fix MSAN failures in benchmarks

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@369482 91177308-0d34-0410-b5e6-96231b3b80d8
Eric Fiselier %!s(int64=6) %!d(string=hai) anos
pai
achega
41cdb89ec7
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  1. 7 1
      benchmarks/algorithms.bench.cpp

+ 7 - 1
benchmarks/algorithms.bench.cpp

@@ -256,7 +256,13 @@ int main(int argc, char** argv) {
     return 1;
     return 1;
 
 
   const std::vector<size_t> Quantities = {1 << 0, 1 << 2,  1 << 4,  1 << 6,
   const std::vector<size_t> Quantities = {1 << 0, 1 << 2,  1 << 4,  1 << 6,
-                                          1 << 8, 1 << 10, 1 << 14, 1 << 18};
+                                          1 << 8, 1 << 10, 1 << 14,
+    // Running each benchmark in parallel consumes too much memory with MSAN
+    // and can lead to the test process being killed.
+#if !TEST_HAS_FEATURE(memory_sanitizer)
+                                          1 << 18
+#endif
+  };
   makeCartesianProductBenchmark<Sort, AllValueTypes, AllOrders>(Quantities);
   makeCartesianProductBenchmark<Sort, AllValueTypes, AllOrders>(Quantities);
   makeCartesianProductBenchmark<StableSort, AllValueTypes, AllOrders>(
   makeCartesianProductBenchmark<StableSort, AllValueTypes, AllOrders>(
       Quantities);
       Quantities);