[compiler-rt] d564cfb - [NFC][compiler-rt][hwasan] Move __hwasan_tag_mismatch4 to hwasan.cpp
Leonard Chan via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 9 10:51:43 PDT 2021
Author: Leonard Chan
Date: 2021-07-09T10:51:22-07:00
New Revision: d564cfb53c71dbbbd46b6719f5fe53d70313de45
URL: https://github.com/llvm/llvm-project/commit/d564cfb53c71dbbbd46b6719f5fe53d70313de45
DIFF: https://github.com/llvm/llvm-project/commit/d564cfb53c71dbbbd46b6719f5fe53d70313de45.diff
LOG: [NFC][compiler-rt][hwasan] Move __hwasan_tag_mismatch4 to hwasan.cpp
This can be moved out of hwasan_linux.cpp because it can be re-used in the fuchsia port.
Differential Revision: https://reviews.llvm.org/D105669
Added:
Modified:
compiler-rt/lib/hwasan/hwasan.cpp
compiler-rt/lib/hwasan/hwasan_linux.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/hwasan/hwasan.cpp b/compiler-rt/lib/hwasan/hwasan.cpp
index 0cae96f35d35..14655257eecc 100644
--- a/compiler-rt/lib/hwasan/hwasan.cpp
+++ b/compiler-rt/lib/hwasan/hwasan.cpp
@@ -574,4 +574,12 @@ void __sanitizer_print_stack_trace() {
GET_FATAL_STACK_TRACE_PC_BP(StackTrace::GetCurrentPc(), GET_CURRENT_FRAME());
stack.Print();
}
+
+// Entry point for interoperability between __hwasan_tag_mismatch (ASM) and the
+// rest of the mismatch handling code (C++).
+void __hwasan_tag_mismatch4(uptr addr, uptr access_info, uptr *registers_frame,
+ size_t outsize) {
+ __hwasan::HwasanTagMismatch(addr, access_info, registers_frame, outsize);
+}
+
} // extern "C"
diff --git a/compiler-rt/lib/hwasan/hwasan_linux.cpp b/compiler-rt/lib/hwasan/hwasan_linux.cpp
index 02672030886c..6f760b04e715 100644
--- a/compiler-rt/lib/hwasan/hwasan_linux.cpp
+++ b/compiler-rt/lib/hwasan/hwasan_linux.cpp
@@ -431,11 +431,4 @@ void Thread::InitStackAndTls(const InitState *) {
} // namespace __hwasan
-// Entry point for interoperability between __hwasan_tag_mismatch (ASM) and the
-// rest of the mismatch handling code (C++).
-void __hwasan_tag_mismatch4(uptr addr, uptr access_info, uptr *registers_frame,
- size_t outsize) {
- __hwasan::HwasanTagMismatch(addr, access_info, registers_frame, outsize);
-}
-
#endif // SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD
More information about the llvm-commits
mailing list