Skip to content

Commit

Permalink
Revert "[compiler-rt] intercept macOs's freadlink call. (llvm#83679)"
Browse files Browse the repository at this point in the history
The lit test has been failing on green dragon since it landed,
e.g. https://green.lab.llvm.org/job/llvm.org/job/clang-stage1-RA/2276/testReport/

This reverts commit a6ea0b0 and
follow-up commits ce72c76,
a280275, and
d705bd2.
  • Loading branch information
zmodem committed Oct 2, 2024
1 parent eb85285 commit c6b12bc
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 58 deletions.
19 changes: 0 additions & 19 deletions compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10350,24 +10350,6 @@ INTERCEPTOR(SSIZE_T, pwritev2, int fd, __sanitizer_iovec *iov, int iovcnt,
#define INIT_PWRITEV2
#endif

#if SANITIZER_INTERCEPT_FREADLINK
INTERCEPTOR(SSIZE_T, freadlink, int fd, char *buf, SIZE_T bufsiz) {
void *ctx;
COMMON_INTERCEPTOR_ENTER(ctx, freadlink, fd, buf, bufsiz);
COMMON_INTERCEPTOR_FD_ACCESS(ctx, fd);
SSIZE_T res = REAL(freadlink)(fd, buf, bufsiz);
if (res > 0)
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, buf, res);
if (res >= 0 && fd > 0)
COMMON_INTERCEPTOR_FD_ACQUIRE(ctx, fd);
return res;
}

# define INIT_FREADLINK COMMON_INTERCEPT_FUNCTION(freadlink)
#else
# define INIT_FREADLINK
#endif

#include "sanitizer_common_interceptors_netbsd_compat.inc"

namespace __sanitizer {
Expand Down Expand Up @@ -10689,7 +10671,6 @@ static void InitializeCommonInterceptors() {
INIT_CPUSET_GETAFFINITY;
INIT_PREADV2;
INIT_PWRITEV2;
INIT_FREADLINK;

INIT___PRINTF_CHK;
}
Original file line number Diff line number Diff line change
Expand Up @@ -607,13 +607,6 @@
// FIXME: also available from musl 1.2.5
#define SANITIZER_INTERCEPT_PREADV2 (SI_LINUX && __GLIBC_PREREQ(2, 26))
#define SANITIZER_INTERCEPT_PWRITEV2 (SI_LINUX && __GLIBC_PREREQ(2, 26))
#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && \
__MAC_OS_X_VERSION_MIN_REQUIRED >= 130000
# define SI_MAC_OS_DEPLOYMENT_MIN_13_00 1
#else
# define SI_MAC_OS_DEPLOYMENT_MIN_13_00 0
#endif
#define SANITIZER_INTERCEPT_FREADLINK (SI_MAC && SI_MAC_OS_DEPLOYMENT_MIN_13_00)

// 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
32 changes: 0 additions & 32 deletions compiler-rt/test/sanitizer_common/TestCases/Darwin/freadlink.c

This file was deleted.

0 comments on commit c6b12bc

Please sign in to comment.