Skip to content

Commit c6b12bc

Browse files
committed
Revert "[compiler-rt] intercept macOs's freadlink call. (#83679)"
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.
1 parent eb85285 commit c6b12bc

File tree

3 files changed

+0
-58
lines changed

3 files changed

+0
-58
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10350,24 +10350,6 @@ INTERCEPTOR(SSIZE_T, pwritev2, int fd, __sanitizer_iovec *iov, int iovcnt,
1035010350
#define INIT_PWRITEV2
1035110351
#endif
1035210352

10353-
#if SANITIZER_INTERCEPT_FREADLINK
10354-
INTERCEPTOR(SSIZE_T, freadlink, int fd, char *buf, SIZE_T bufsiz) {
10355-
void *ctx;
10356-
COMMON_INTERCEPTOR_ENTER(ctx, freadlink, fd, buf, bufsiz);
10357-
COMMON_INTERCEPTOR_FD_ACCESS(ctx, fd);
10358-
SSIZE_T res = REAL(freadlink)(fd, buf, bufsiz);
10359-
if (res > 0)
10360-
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, buf, res);
10361-
if (res >= 0 && fd > 0)
10362-
COMMON_INTERCEPTOR_FD_ACQUIRE(ctx, fd);
10363-
return res;
10364-
}
10365-
10366-
# define INIT_FREADLINK COMMON_INTERCEPT_FUNCTION(freadlink)
10367-
#else
10368-
# define INIT_FREADLINK
10369-
#endif
10370-
1037110353
#include "sanitizer_common_interceptors_netbsd_compat.inc"
1037210354

1037310355
namespace __sanitizer {
@@ -10689,7 +10671,6 @@ static void InitializeCommonInterceptors() {
1068910671
INIT_CPUSET_GETAFFINITY;
1069010672
INIT_PREADV2;
1069110673
INIT_PWRITEV2;
10692-
INIT_FREADLINK;
1069310674

1069410675
INIT___PRINTF_CHK;
1069510676
}

compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -607,13 +607,6 @@
607607
// FIXME: also available from musl 1.2.5
608608
#define SANITIZER_INTERCEPT_PREADV2 (SI_LINUX && __GLIBC_PREREQ(2, 26))
609609
#define SANITIZER_INTERCEPT_PWRITEV2 (SI_LINUX && __GLIBC_PREREQ(2, 26))
610-
#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && \
611-
__MAC_OS_X_VERSION_MIN_REQUIRED >= 130000
612-
# define SI_MAC_OS_DEPLOYMENT_MIN_13_00 1
613-
#else
614-
# define SI_MAC_OS_DEPLOYMENT_MIN_13_00 0
615-
#endif
616-
#define SANITIZER_INTERCEPT_FREADLINK (SI_MAC && SI_MAC_OS_DEPLOYMENT_MIN_13_00)
617610

618611
// This macro gives a way for downstream users to override the above
619612
// interceptor macros irrespective of the platform they are on. They have

compiler-rt/test/sanitizer_common/TestCases/Darwin/freadlink.c

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)