aboutsummaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_common_interceptors.inc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sanitizer_common/sanitizer_common_interceptors.inc')
-rw-r--r--lib/sanitizer_common/sanitizer_common_interceptors.inc43
1 files changed, 0 insertions, 43 deletions
diff --git a/lib/sanitizer_common/sanitizer_common_interceptors.inc b/lib/sanitizer_common/sanitizer_common_interceptors.inc
index 3c69726d7c91..53204b48e300 100644
--- a/lib/sanitizer_common/sanitizer_common_interceptors.inc
+++ b/lib/sanitizer_common/sanitizer_common_interceptors.inc
@@ -34,8 +34,6 @@
// COMMON_INTERCEPTOR_MEMSET_IMPL
// COMMON_INTERCEPTOR_MEMMOVE_IMPL
// COMMON_INTERCEPTOR_MEMCPY_IMPL
-// COMMON_INTERCEPTOR_COPY_STRING
-// COMMON_INTERCEPTOR_STRNDUP_IMPL
//===----------------------------------------------------------------------===//
#include "interception/interception.h"
@@ -219,25 +217,6 @@ bool PlatformHasDifferentMemcpyAndMemmove();
}
#endif
-#ifndef COMMON_INTERCEPTOR_COPY_STRING
-#define COMMON_INTERCEPTOR_COPY_STRING(ctx, to, from, size) {}
-#endif
-
-#ifndef COMMON_INTERCEPTOR_STRNDUP_IMPL
-#define COMMON_INTERCEPTOR_STRNDUP_IMPL(ctx, s, size) \
- COMMON_INTERCEPTOR_ENTER(ctx, strndup, s, size); \
- uptr from_length = internal_strnlen(s, size); \
- uptr copy_length = Min(size, from_length); \
- char *new_mem = (char *)WRAP(malloc)(copy_length + 1); \
- if (common_flags()->intercept_strndup) { \
- COMMON_INTERCEPTOR_READ_RANGE(ctx, s, copy_length + 1); \
- } \
- COMMON_INTERCEPTOR_COPY_STRING(ctx, new_mem, s, copy_length); \
- internal_memcpy(new_mem, s, copy_length); \
- new_mem[copy_length] = '\0'; \
- return new_mem;
-#endif
-
struct FileMetadata {
// For open_memstream().
char **addr;
@@ -321,26 +300,6 @@ INTERCEPTOR(SIZE_T, strnlen, const char *s, SIZE_T maxlen) {
#define INIT_STRNLEN
#endif
-#if SANITIZER_INTERCEPT_STRNDUP
-INTERCEPTOR(char*, strndup, const char *s, uptr size) {
- void *ctx;
- COMMON_INTERCEPTOR_STRNDUP_IMPL(ctx, s, size);
-}
-#define INIT_STRNDUP COMMON_INTERCEPT_FUNCTION(strndup)
-#else
-#define INIT_STRNDUP
-#endif // SANITIZER_INTERCEPT_STRNDUP
-
-#if SANITIZER_INTERCEPT___STRNDUP
-INTERCEPTOR(char*, __strndup, const char *s, uptr size) {
- void *ctx;
- COMMON_INTERCEPTOR_STRNDUP_IMPL(ctx, s, size);
-}
-#define INIT___STRNDUP COMMON_INTERCEPT_FUNCTION(__strndup)
-#else
-#define INIT___STRNDUP
-#endif // SANITIZER_INTERCEPT___STRNDUP
-
#if SANITIZER_INTERCEPT_TEXTDOMAIN
INTERCEPTOR(char*, textdomain, const char *domainname) {
void *ctx;
@@ -6204,8 +6163,6 @@ static void InitializeCommonInterceptors() {
INIT_TEXTDOMAIN;
INIT_STRLEN;
INIT_STRNLEN;
- INIT_STRNDUP;
- INIT___STRNDUP;
INIT_STRCMP;
INIT_STRNCMP;
INIT_STRCASECMP;