summaryrefslogtreecommitdiff
path: root/lib/esan
diff options
context:
space:
mode:
authorDerek Bruening <bruening@google.com>2016-06-13 16:16:49 +0000
committerDerek Bruening <bruening@google.com>2016-06-13 16:16:49 +0000
commit97a35f8a8e9741e9157c0afdbb48a9db99d8a718 (patch)
treeb85b137b49b5a969201a29868e71cd124e6c4b47 /lib/esan
parentd5a0419aecd169af9f26b6f7254ff2ef555e497f (diff)
Revert "[sanitizer][esan] Add internal_sigaction_syscall"
This reverts commit r272553. The iOS build fails to link. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@272557 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/esan')
-rw-r--r--lib/esan/esan.cpp3
-rw-r--r--lib/esan/esan_interceptors.cpp6
-rw-r--r--lib/esan/working_set.cpp5
-rw-r--r--lib/esan/working_set.h1
4 files changed, 1 insertions, 14 deletions
diff --git a/lib/esan/esan.cpp b/lib/esan/esan.cpp
index e6d6aff31..e7399e219 100644
--- a/lib/esan/esan.cpp
+++ b/lib/esan/esan.cpp
@@ -197,9 +197,6 @@ void initializeLibrary(ToolType Tool) {
}
initializeShadow();
- if (__esan_which_tool == ESAN_WorkingSet)
- initializeShadowWorkingSet();
-
initializeInterceptors();
if (__esan_which_tool == ESAN_CacheFrag) {
diff --git a/lib/esan/esan_interceptors.cpp b/lib/esan/esan_interceptors.cpp
index 7aefeb664..5d4edb51d 100644
--- a/lib/esan/esan_interceptors.cpp
+++ b/lib/esan/esan_interceptors.cpp
@@ -17,7 +17,6 @@
#include "interception/interception.h"
#include "sanitizer_common/sanitizer_common.h"
#include "sanitizer_common/sanitizer_libc.h"
-#include "sanitizer_common/sanitizer_linux.h"
#include "sanitizer_common/sanitizer_stacktrace.h"
using namespace __esan; // NOLINT
@@ -398,11 +397,6 @@ INTERCEPTOR(int, sigaction, int signum, const struct sigaction *act,
// This is required to properly use internal_sigaction.
namespace __sanitizer {
int real_sigaction(int signum, const void *act, void *oldact) {
- if (REAL(sigaction) == nullptr) {
- // With an instrumented allocator, this is called during interceptor init
- // and we need a raw syscall solution.
- return internal_sigaction_syscall(signum, act, oldact);
- }
return REAL(sigaction)(signum, (const struct sigaction *)act,
(struct sigaction *)oldact);
}
diff --git a/lib/esan/working_set.cpp b/lib/esan/working_set.cpp
index 622fd29e8..9e7520f49 100644
--- a/lib/esan/working_set.cpp
+++ b/lib/esan/working_set.cpp
@@ -182,13 +182,10 @@ static void takeSample(void *Arg) {
}
}
-// Initialization that must be done before any instrumented code is executed.
-void initializeShadowWorkingSet() {
+void initializeWorkingSet() {
CHECK(getFlags()->cache_line_size == CacheLineSize);
registerMemoryFaultHandler();
-}
-void initializeWorkingSet() {
if (getFlags()->record_snapshots) {
for (u32 i = 0; i < NumFreq; ++i)
SizePerFreq[i].initialize(CircularBufferSizes[i]);
diff --git a/lib/esan/working_set.h b/lib/esan/working_set.h
index 034dfe6d9..3750a480a 100644
--- a/lib/esan/working_set.h
+++ b/lib/esan/working_set.h
@@ -21,7 +21,6 @@
namespace __esan {
void initializeWorkingSet();
-void initializeShadowWorkingSet();
int finalizeWorkingSet();
void processRangeAccessWorkingSet(uptr PC, uptr Addr, SIZE_T Size,
bool IsWrite);