summaryrefslogtreecommitdiff
path: root/lib/msan/msan_interceptors.cc
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2018-03-07 00:14:30 +0000
committerVitaly Buka <vitalybuka@google.com>2018-03-07 00:14:30 +0000
commite6fe6d618bcd23f8baa1d3b2bb38f236c019ba2d (patch)
treed6b17aedc134d41bdf2be96e27175fa06a08b3cd /lib/msan/msan_interceptors.cc
parent4f09499dc766ec4ce5170f4553a6951a5e063c29 (diff)
downloadcompiler-rt-e6fe6d618bcd23f8baa1d3b2bb38f236c019ba2d.tar.gz
[sanitizer] Move strxfrm interceptors into sanitizer_common
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@326853 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/msan_interceptors.cc')
-rw-r--r--lib/msan/msan_interceptors.cc34
1 files changed, 0 insertions, 34 deletions
diff --git a/lib/msan/msan_interceptors.cc b/lib/msan/msan_interceptors.cc
index dce9e8afa..5d4a43ddd 100644
--- a/lib/msan/msan_interceptors.cc
+++ b/lib/msan/msan_interceptors.cc
@@ -481,37 +481,6 @@ INTERCEPTOR(int, swprintf, void *str, uptr size, void *format, ...) {
return res;
}
-INTERCEPTOR(SIZE_T, strxfrm, char *dest, const char *src, SIZE_T n) {
- ENSURE_MSAN_INITED();
- CHECK_UNPOISONED(src, REAL(strlen)(src) + 1);
- SIZE_T res = REAL(strxfrm)(dest, src, n);
- if (res < n) __msan_unpoison(dest, res + 1);
- return res;
-}
-
-INTERCEPTOR(SIZE_T, strxfrm_l, char *dest, const char *src, SIZE_T n,
- void *loc) {
- ENSURE_MSAN_INITED();
- CHECK_UNPOISONED(src, REAL(strlen)(src) + 1);
- SIZE_T res = REAL(strxfrm_l)(dest, src, n, loc);
- if (res < n) __msan_unpoison(dest, res + 1);
- return res;
-}
-
-#if SANITIZER_LINUX
-INTERCEPTOR(SIZE_T, __strxfrm_l, char *dest, const char *src, SIZE_T n,
- void *loc) {
- ENSURE_MSAN_INITED();
- CHECK_UNPOISONED(src, REAL(strlen)(src) + 1);
- SIZE_T res = REAL(__strxfrm_l)(dest, src, n, loc);
- if (res < n) __msan_unpoison(dest, res + 1);
- return res;
-}
-#define MSAN_MAYBE_INTERCEPT___STRXFRM_L INTERCEPT_FUNCTION(__strxfrm_l)
-#else
-#define MSAN_MAYBE_INTERCEPT___STRXFRM_L
-#endif
-
#define INTERCEPTOR_STRFTIME_BODY(char_type, ret_type, func, s, ...) \
ENSURE_MSAN_INITED(); \
InterceptorScope interceptor_scope; \
@@ -1611,9 +1580,6 @@ void InitializeInterceptors() {
INTERCEPT_FUNCTION(vswprintf);
INTERCEPT_FUNCTION(swprintf);
#endif
- INTERCEPT_FUNCTION(strxfrm);
- INTERCEPT_FUNCTION(strxfrm_l);
- MSAN_MAYBE_INTERCEPT___STRXFRM_L;
INTERCEPT_FUNCTION(strftime);
INTERCEPT_FUNCTION(strftime_l);
MSAN_MAYBE_INTERCEPT___STRFTIME_L;