Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10264,38 +10264,6 @@ INTERCEPTOR(int, cpuset_getaffinity, int level, int which, __int64_t id, SIZE_T
#define INIT_CPUSET_GETAFFINITY
#endif

#if SANITIZER_INTERCEPT_PREADV2
INTERCEPTOR(SSIZE_T, preadv2, int fd, __sanitizer_iovec *iov, int iovcnt,
OFF_T offset, int flags) {
void *ctx;
COMMON_INTERCEPTOR_ENTER(ctx, preadv2, fd, iov, iovcnt, offset, flags);
COMMON_INTERCEPTOR_FD_ACCESS(ctx, fd);
SSIZE_T res = REAL(preadv2)(fd, iov, iovcnt, offset, flags);
if (res > 0) write_iovec(ctx, iov, iovcnt, res);
if (res >= 0 && fd >= 0) COMMON_INTERCEPTOR_FD_ACQUIRE(ctx, fd);
return res;
}
#define INIT_PREADV2 COMMON_INTERCEPT_FUNCTION(preadv2)
#else
#define INIT_PREADV2
#endif

#if SANITIZER_INTERCEPT_PWRITEV2
INTERCEPTOR(SSIZE_T, pwritev2, int fd, __sanitizer_iovec *iov, int iovcnt,
OFF_T offset, int flags) {
void *ctx;
COMMON_INTERCEPTOR_ENTER(ctx, pwritev2, fd, iov, iovcnt, offset, flags);
COMMON_INTERCEPTOR_FD_ACCESS(ctx, fd);
if (fd >= 0) COMMON_INTERCEPTOR_FD_RELEASE(ctx, fd);
SSIZE_T res = REAL(pwritev2)(fd, iov, iovcnt, offset, flags);
if (res > 0) read_iovec(ctx, iov, iovcnt, res);
return res;
}
#define INIT_PWRITEV2 COMMON_INTERCEPT_FUNCTION(pwritev2)
#else
#define INIT_PWRITEV2
#endif

#include "sanitizer_common_interceptors_netbsd_compat.inc"

namespace __sanitizer {
Expand Down Expand Up @@ -10615,8 +10583,6 @@ static void InitializeCommonInterceptors() {
INIT___XUNAME;
INIT_ARGP_PARSE;
INIT_CPUSET_GETAFFINITY;
INIT_PREADV2;
INIT_PWRITEV2;

INIT___PRINTF_CHK;
}
Original file line number Diff line number Diff line change
Expand Up @@ -598,9 +598,6 @@
#define SANITIZER_INTERCEPT_PROCCTL SI_FREEBSD
#define SANITIZER_INTERCEPT_ARGP_PARSE SI_GLIBC
#define SANITIZER_INTERCEPT_CPUSET_GETAFFINITY SI_FREEBSD
// FIXME: also available from musl 1.2.5
#define SANITIZER_INTERCEPT_PREADV2 SI_GLIBC
#define SANITIZER_INTERCEPT_PWRITEV2 SI_GLIBC

// This macro gives a way for downstream users to override the above
// interceptor macros irrespective of the platform they are on. They have
Expand Down
28 changes: 0 additions & 28 deletions compiler-rt/test/sanitizer_common/TestCases/Linux/preadv2.cpp

This file was deleted.