summaryrefslogtreecommitdiff
path: root/lib/hwasan
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2019-02-21 22:02:24 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2019-02-21 22:02:24 +0000
commit748f97f86ca8e5ce660be440ddee30d93e8f87c8 (patch)
tree94daf3376f20e2e7d96314776d2275a62309ff95 /lib/hwasan
parent0733cd3710e924eb8452338480e27db71c35910f (diff)
downloadcompiler-rt-748f97f86ca8e5ce660be440ddee30d93e8f87c8.tar.gz
Revert "[asan] Fix vfork handling.", +1
Revert r354625, r354627 - multiple build failures. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@354629 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/hwasan')
-rw-r--r--lib/hwasan/CMakeLists.txt1
-rw-r--r--lib/hwasan/hwasan.cc24
-rw-r--r--lib/hwasan/hwasan_interceptors.cc5
-rw-r--r--lib/hwasan/hwasan_interceptors_vfork.S7
-rw-r--r--lib/hwasan/hwasan_interface_internal.h6
-rw-r--r--lib/hwasan/hwasan_thread.h3
6 files changed, 0 insertions, 46 deletions
diff --git a/lib/hwasan/CMakeLists.txt b/lib/hwasan/CMakeLists.txt
index d64564412..7460abc54 100644
--- a/lib/hwasan/CMakeLists.txt
+++ b/lib/hwasan/CMakeLists.txt
@@ -6,7 +6,6 @@ set(HWASAN_RTL_SOURCES
hwasan_allocator.cc
hwasan_dynamic_shadow.cc
hwasan_interceptors.cc
- hwasan_interceptors_vfork.S
hwasan_linux.cc
hwasan_memintrinsics.cc
hwasan_poisoning.cc
diff --git a/lib/hwasan/hwasan.cc b/lib/hwasan/hwasan.cc
index 3a87dea26..9c83f73bd 100644
--- a/lib/hwasan/hwasan.cc
+++ b/lib/hwasan/hwasan.cc
@@ -477,30 +477,6 @@ void __hwasan_handle_longjmp(const void *sp_dst) {
TagMemory(sp, dst - sp, 0);
}
-void __hwasan_handle_vfork(const void *sp_dst) {
- uptr sp = (uptr)sp_dst;
- Thread *t = GetCurrentThread();
- CHECK(t);
- uptr top = t->stack_top();
- uptr bottom = t->stack_bottom();
- static const uptr kMaxExpectedCleanupSize = 64 << 20; // 64M
- if (top == 0 || bottom == 0 || sp < bottom || sp >= top ||
- sp - bottom > kMaxExpectedCleanupSize) {
- Report(
- "WARNING: HWASan is ignoring requested __hwasan_handle_vfork: "
- "stack top: %zx; current %zx; bottom: %zx \n"
- "False positive error reports may follow\n",
- top, sp, bottom);
- return;
- }
- TagMemory(bottom, sp - bottom, 0);
-}
-
-void *__hwasan_extra_spill_area() {
- Thread *t = GetCurrentThread();
- return &t->vfork_spill();
-}
-
void __hwasan_print_memory_usage() {
InternalScopedString s(kMemoryUsageBufferSize);
HwasanFormatMemoryUsage(s);
diff --git a/lib/hwasan/hwasan_interceptors.cc b/lib/hwasan/hwasan_interceptors.cc
index 1884b3da3..baecb1e03 100644
--- a/lib/hwasan/hwasan_interceptors.cc
+++ b/lib/hwasan/hwasan_interceptors.cc
@@ -227,10 +227,6 @@ INTERCEPTOR(int, pthread_create, void *th, void *attr,
}
#endif
-#if HWASAN_WITH_INTERCEPTORS
-DEFINE_REAL(void, vfork);
-#endif
-
static void BeforeFork() {
StackDepotLockAll();
}
@@ -270,7 +266,6 @@ void InitializeInterceptors() {
INTERCEPT_FUNCTION(fork);
#if HWASAN_WITH_INTERCEPTORS
- __interception::GetRealFunctionAddress("vfork", (uptr *)&REAL(vfork), 0, 0);
#if !defined(__aarch64__)
INTERCEPT_FUNCTION(pthread_create);
#endif
diff --git a/lib/hwasan/hwasan_interceptors_vfork.S b/lib/hwasan/hwasan_interceptors_vfork.S
deleted file mode 100644
index 54b4a78db..000000000
--- a/lib/hwasan/hwasan_interceptors_vfork.S
+++ /dev/null
@@ -1,7 +0,0 @@
-#define COMMON_INTERCEPTOR_SPILL_AREA __hwasan_extra_spill_area
-#define COMMON_INTERCEPTOR_HANDLE_VFORK __hwasan_handle_vfork
-#include "sanitizer_common/sanitizer_common_interceptors_vfork_aarch64.inc.S"
-
-#if defined(__linux__)
-.section .note.GNU-stack,"",@progbits
-#endif
diff --git a/lib/hwasan/hwasan_interface_internal.h b/lib/hwasan/hwasan_interface_internal.h
index 1b025c923..c2ae66653 100644
--- a/lib/hwasan/hwasan_interface_internal.h
+++ b/lib/hwasan/hwasan_interface_internal.h
@@ -117,9 +117,6 @@ SANITIZER_INTERFACE_ATTRIBUTE
void __hwasan_handle_longjmp(const void *sp_dst);
SANITIZER_INTERFACE_ATTRIBUTE
-void __hwasan_handle_vfork(const void *sp_dst);
-
-SANITIZER_INTERFACE_ATTRIBUTE
u16 __sanitizer_unaligned_load16(const uu16 *p);
SANITIZER_INTERFACE_ATTRIBUTE
@@ -203,9 +200,6 @@ SANITIZER_INTERFACE_ATTRIBUTE
void *__hwasan_memset(void *s, int c, uptr n);
SANITIZER_INTERFACE_ATTRIBUTE
void *__hwasan_memmove(void *dest, const void *src, uptr n);
-
-SANITIZER_INTERFACE_ATTRIBUTE
-void *__hwasan_extra_spill_area();
} // extern "C"
#endif // HWASAN_INTERFACE_INTERNAL_H
diff --git a/lib/hwasan/hwasan_thread.h b/lib/hwasan/hwasan_thread.h
index 6fa592bfa..9c45adec1 100644
--- a/lib/hwasan/hwasan_thread.h
+++ b/lib/hwasan/hwasan_thread.h
@@ -67,14 +67,11 @@ class Thread {
Print("Thread: ");
}
- uptr &vfork_spill() { return vfork_spill_; }
-
private:
// NOTE: There is no Thread constructor. It is allocated
// via mmap() and *must* be valid in zero-initialized state.
void ClearShadowForThreadStackAndTLS();
void Print(const char *prefix);
- uptr vfork_spill_;
uptr stack_top_;
uptr stack_bottom_;
uptr tls_begin_;