// Fails with debug checks: https://bugs.llvm.org/show_bug.cgi?id=46860
// XFAIL: !compiler-rt-optimized && tsan
+// FIXME: Implement.
+// XFAIL: hwasan
+
// RUN: %clangxx -O0 %s -o %t
// RUN: %env_tool_opts=handle_segv=0 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK0
// RUN: %clangxx %s -o %t && %run not %t 1 2>&1 | FileCheck %s
// UNSUPPORTED: lsan,ubsan,android
+// FIXME: Implement.
+// XFAIL: hwasan
+
#include <dlfcn.h>
#include <stdio.h>
#include <string>
// RUN: %clang -O2 %s -o %t && %run %t
-// Ubsan does not provide allocator.
-// UNSUPPORTED: ubsan
+// Must not be implemented, no other reason to install interceptors.
+// XFAIL: ubsan
+
+// FIXME: Implement.
+// XFAIL: hwasan
#include <assert.h>
#include <malloc.h>
+// Test that sanitizers suppress mlock.
// RUN: %clang %s -o %t && %run %t
-// XFAIL: ubsan,lsan
+
+// No shadow, so no need to disable mlock.
+// XFAIL: ubsan, lsan
+
+// FIXME: Implement.
+// XFAIL: hwasan
#include <assert.h>
#include <sys/mman.h>
int main() {
+#if defined(__has_feature)
+# if __has_feature(hwaddress_sanitizer)
+ // Don't mlock, it may claim all memory.
+ abort();
+# endif
+#endif
assert(0 == mlockall(MCL_CURRENT));
assert(0 == mlock((void *)0x12345, 0x5678));
assert(0 == munlockall());
assert(0 == munlock((void *)0x987, 0x654));
}
-
// RUN: %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-DUMP
//
// FIXME: Implement.
-// UNSUPPORTED: asan
-// UNSUPPORTED: lsan
-// UNSUPPORTED: msan
-// UNSUPPORTED: tsan
-// UNSUPPORTED: ubsan
+// XFAIL: *
#include <signal.h>
// TODO: Fix option on Android, it hangs there for unknown reasons.
// XFAIL: android
+// FIXME: Implement.
+// XFAIL: hwasan
+
#if defined(__APPLE__)
#include <Availability.h>
#endif
// FIXME: Add linux support.
// XFAIL: msan && target={{.*linux.*}}
-// FIXME: Add lsan support.
-// XFAIL: lsan
+// FIXME: Implement.
+// XFAIL: lsan, hwasan
int global;
// Test the weak hooks.
-// RUN: %clangxx %s -o %t
-// RUN: %run %t
+// RUN: %clangxx %s -o %t && %run %t
-// Hooks are not implemented for lsan.
-// XFAIL: lsan
-// XFAIL: ubsan
+// Must not be implemented, no other reason to install interceptors.
+// XFAIL: lsan, ubsan
+
+// FIXME: Implement.
+// XFAIL: hwasan
#include <assert.h>
#include <string.h>
// RUN: %clangxx -O0 -g %s -o %t && %run %t
-// UBSan does not have its own allocator
-// UNSUPPORTED: ubsan
+// Must not be implemented, no other reason to install interceptors.
+// XFAIL: ubsan
+
+// FIXME: Implement.
+// XFAIL: hwasan
#include <assert.h>
#include <sanitizer/allocator_interface.h>
// Malloc/free hooks are not supported on Windows.
// XFAIL: target={{.*windows-msvc.*}}
+
+// Must not be implemented, no other reason to install interceptors.
// XFAIL: ubsan
+// FIXME: Implement.
+// XFAIL: hwasan
+
#include <stdlib.h>
#include <unistd.h>
#include <sanitizer/allocator_interface.h>
// win32 is disabled due to failing errno tests.
// UNSUPPORTED: ubsan, target={{.*windows-msvc.*}}
+// FIXME: Implement.
+// XFAIL: hwasan
+
#include <assert.h>
#include <errno.h>
#include <limits>