aboutsummaryrefslogtreecommitdiff
path: root/compiler-rt
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/lib/nsan/tests/NSanUnitTest.cpp11
-rw-r--r--compiler-rt/lib/tsan/rtl/tsan_platform_mac.cpp2
-rw-r--r--compiler-rt/test/fuzzer/fuzzer-ubsan.test3
-rw-r--r--compiler-rt/test/fuzzer/reduce_inputs.test2
4 files changed, 11 insertions, 7 deletions
diff --git a/compiler-rt/lib/nsan/tests/NSanUnitTest.cpp b/compiler-rt/lib/nsan/tests/NSanUnitTest.cpp
index 73b5967..d121292 100644
--- a/compiler-rt/lib/nsan/tests/NSanUnitTest.cpp
+++ b/compiler-rt/lib/nsan/tests/NSanUnitTest.cpp
@@ -43,8 +43,8 @@ template <typename FT, auto next> void TestFT() {
ASSERT_EQ(GetULPDiff<FT>(-X, -Y), 3);
// Values with larger differences.
- static constexpr const __uint128_t MantissaSize =
- __uint128_t{1} << FTInfo<FT>::kMantissaBits;
+ static constexpr const __sanitizer::u64 MantissaSize =
+ __sanitizer::u64{1} << FTInfo<FT>::kMantissaBits;
ASSERT_EQ(GetULPDiff<FT>(1.0, next(2.0, 1.0)), MantissaSize - 1);
ASSERT_EQ(GetULPDiff<FT>(1.0, 2.0), MantissaSize);
ASSERT_EQ(GetULPDiff<FT>(1.0, next(2.0, 3.0)), MantissaSize + 1);
@@ -57,6 +57,11 @@ TEST(NSanTest, Double) {
TestFT<double, static_cast<double (*)(double, double)>(nextafter)>();
}
-TEST(NSanTest, Float128) { TestFT<__float128, nextafterf128>(); }
+TEST(NSanTest, Float128) {
+ // Very basic tests. FIXME: improve when we have nextafter<__float128>.
+ ASSERT_EQ(GetULPDiff<__float128>(0.0, 0.0), 0);
+ ASSERT_EQ(GetULPDiff<__float128>(-0.0, 0.0), 0);
+ ASSERT_NE(GetULPDiff<__float128>(-0.01, 0.01), kMaxULPDiff);
+}
} // end namespace __nsan
diff --git a/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cpp b/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cpp
index 62ab055..7fa5e01 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cpp
@@ -259,7 +259,9 @@ void InitializePlatform() {
ThreadEventCallbacks callbacks = {
.create = ThreadCreateCallback,
+ .start = nullptr,
.terminate = ThreadTerminateCallback,
+ .destroy = nullptr,
};
InstallPthreadIntrospectionHook(callbacks);
#endif
diff --git a/compiler-rt/test/fuzzer/fuzzer-ubsan.test b/compiler-rt/test/fuzzer/fuzzer-ubsan.test
index d22339d..6bc2c38 100644
--- a/compiler-rt/test/fuzzer/fuzzer-ubsan.test
+++ b/compiler-rt/test/fuzzer/fuzzer-ubsan.test
@@ -1,6 +1,3 @@
-// This test currently fails to compile on green.lab.llvm.org (arm)
-// XFAIL: system-darwin && target=arm{{.*}}
-
RUN: %cpp_compiler -fsanitize=undefined -fno-sanitize-recover=all %S/SignedIntOverflowTest.cpp -o %t-SignedIntOverflowTest-Ubsan
RUN: not %run %t-SignedIntOverflowTest-Ubsan 2>&1 | FileCheck %s
CHECK: runtime error: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
diff --git a/compiler-rt/test/fuzzer/reduce_inputs.test b/compiler-rt/test/fuzzer/reduce_inputs.test
index e65f572..d296fa4 100644
--- a/compiler-rt/test/fuzzer/reduce_inputs.test
+++ b/compiler-rt/test/fuzzer/reduce_inputs.test
@@ -12,5 +12,5 @@ RUN: %run %t-ShrinkControlFlowSimpleTest -runs=0 %t/C 2>&1 | FileCheck %s --chec
COUNT: seed corpus: files: 4
# a bit longer test
-RUN: %run %t-ShrinkControlFlowTest -exit_on_item=0eb8e4ed029b774d80f2b66408203801cb982a60 -seed=42 -runs=1000000 2>&1 | FileCheck %s
+RUN: %run %t-ShrinkControlFlowTest -exit_on_item=0eb8e4ed029b774d80f2b66408203801cb982a60 -seed=42 -runs=10000000 2>&1 | FileCheck %s