summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/lsan/CMakeLists.txt3
-rw-r--r--lib/lsan/lsan_common_mac.cc40
-rw-r--r--lib/sanitizer_common/CMakeLists.txt1
-rw-r--r--lib/sanitizer_common/sanitizer_stoptheworld_mac.cc38
4 files changed, 81 insertions, 1 deletions
diff --git a/lib/lsan/CMakeLists.txt b/lib/lsan/CMakeLists.txt
index b782f2421..e78bf6d3e 100644
--- a/lib/lsan/CMakeLists.txt
+++ b/lib/lsan/CMakeLists.txt
@@ -5,7 +5,8 @@ append_rtti_flag(OFF LSAN_CFLAGS)
set(LSAN_COMMON_SOURCES
lsan_common.cc
- lsan_common_linux.cc)
+ lsan_common_linux.cc
+ lsan_common_mac.cc)
set(LSAN_SOURCES
lsan.cc
diff --git a/lib/lsan/lsan_common_mac.cc b/lib/lsan/lsan_common_mac.cc
new file mode 100644
index 000000000..c9e50ae36
--- /dev/null
+++ b/lib/lsan/lsan_common_mac.cc
@@ -0,0 +1,40 @@
+//=-- lsan_common_mac.cc --------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of LeakSanitizer.
+// Implementation of common leak checking functionality. Darwin-specific code.
+//
+//===----------------------------------------------------------------------===//
+
+#include "sanitizer_common/sanitizer_platform.h"
+#include "lsan_common.h"
+
+#if CAN_SANITIZE_LEAKS && SANITIZER_MAC
+namespace __lsan {
+
+void InitializePlatformSpecificModules() {
+ CHECK(0 && "unimplemented");
+}
+
+// Scans global variables for heap pointers.
+void ProcessGlobalRegions(Frontier *frontier) {
+ CHECK(0 && "unimplemented");
+}
+
+void ProcessPlatformSpecificAllocations(Frontier *frontier) {
+ CHECK(0 && "unimplemented");
+}
+
+void DoStopTheWorld(StopTheWorldCallback callback, void *argument) {
+ CHECK(0 && "unimplemented");
+}
+
+} // namespace __lsan
+
+#endif // CAN_SANITIZE_LEAKS && SANITIZER_MAC
diff --git a/lib/sanitizer_common/CMakeLists.txt b/lib/sanitizer_common/CMakeLists.txt
index 32d0a6c66..6cdc91897 100644
--- a/lib/sanitizer_common/CMakeLists.txt
+++ b/lib/sanitizer_common/CMakeLists.txt
@@ -25,6 +25,7 @@ set(SANITIZER_SOURCES_NOTERMINATION
sanitizer_stackdepot.cc
sanitizer_stacktrace.cc
sanitizer_stacktrace_printer.cc
+ sanitizer_stoptheworld_mac.cc
sanitizer_suppressions.cc
sanitizer_symbolizer.cc
sanitizer_symbolizer_libbacktrace.cc
diff --git a/lib/sanitizer_common/sanitizer_stoptheworld_mac.cc b/lib/sanitizer_common/sanitizer_stoptheworld_mac.cc
new file mode 100644
index 000000000..4cccc295e
--- /dev/null
+++ b/lib/sanitizer_common/sanitizer_stoptheworld_mac.cc
@@ -0,0 +1,38 @@
+//===-- sanitizer_stoptheworld_mac.cc -------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// See sanitizer_stoptheworld.h for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "sanitizer_platform.h"
+
+#if SANITIZER_MAC && (defined(__x86_64__) || defined(__aarch64__))
+
+#include "sanitizer_stoptheworld.h"
+
+namespace __sanitizer {
+void StopTheWorld(StopTheWorldCallback callback, void *argument) {
+ CHECK(0 && "unimplemented");
+}
+
+int SuspendedThreadsList::GetRegistersAndSP(uptr index,
+ uptr *buffer,
+ uptr *sp) const {
+ CHECK(0 && "unimplemented");
+ return 0;
+}
+
+uptr SuspendedThreadsList::RegisterCount() {
+ CHECK(0 && "unimplemented");
+ return 0;
+}
+} // namespace __sanitizer
+
+#endif // SANITIZER_MAC && (defined(__x86_64__) || defined(__aarch64__))