Skip to content

Commit 70e0c8f

Browse files
committed
Revert 'hwasan: lay groundwork for importing subset of sanitizer_common interceptors [NFC]'
It was reported in https://reviews.llvm.org/D150708 that my patch has broken stage2/hwasan check: https://lab.llvm.org/buildbot/#/builders/236/builds/4069 Reverting that patch (and the followup fixes) until I can investigate this further
1 parent 8be4bd1 commit 70e0c8f

File tree

1 file changed

+0
-103
lines changed

1 file changed

+0
-103
lines changed

compiler-rt/lib/hwasan/hwasan_interceptors.cpp

Lines changed: 0 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
#include "hwasan.h"
1818
#include "hwasan_checks.h"
19-
#include "hwasan_platform_interceptors.h"
2019
#include "hwasan_thread.h"
2120
#include "hwasan_thread_list.h"
2221
#include "interception/interception.h"
@@ -45,104 +44,6 @@ using namespace __hwasan;
4544
# include "sanitizer_common/sanitizer_common_syscalls.inc"
4645
# include "sanitizer_common/sanitizer_syscalls_netbsd.inc"
4746

48-
#define COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ptr, size) \
49-
do { \
50-
} while (false)
51-
52-
#define COMMON_INTERCEPTOR_READ_RANGE(ctx, ptr, size) \
53-
do { \
54-
(void)(ctx); \
55-
(void)(ptr); \
56-
(void)(size); \
57-
} while (false)
58-
59-
#define COMMON_INTERCEPTOR_ENTER(ctx, func, ...) \
60-
do { \
61-
(void)(ctx); \
62-
(void)(func); \
63-
} while (false)
64-
65-
#define COMMON_INTERCEPTOR_DIR_ACQUIRE(ctx, path) \
66-
do { \
67-
(void)(ctx); \
68-
(void)(path); \
69-
} while (false)
70-
71-
#define COMMON_INTERCEPTOR_FD_ACQUIRE(ctx, fd) \
72-
do { \
73-
(void)(ctx); \
74-
(void)(fd); \
75-
} while (false)
76-
77-
#define COMMON_INTERCEPTOR_FD_RELEASE(ctx, fd) \
78-
do { \
79-
(void)(ctx); \
80-
(void)(fd); \
81-
} while (false)
82-
83-
#define COMMON_INTERCEPTOR_FD_SOCKET_ACCEPT(ctx, fd, newfd) \
84-
do { \
85-
(void)(ctx); \
86-
(void)(fd); \
87-
(void)(newfd); \
88-
} while (false)
89-
90-
#define COMMON_INTERCEPTOR_SET_THREAD_NAME(ctx, name) \
91-
do { \
92-
(void)(ctx); \
93-
(void)(name); \
94-
} while (false)
95-
96-
#define COMMON_INTERCEPTOR_SET_PTHREAD_NAME(ctx, thread, name) \
97-
do { \
98-
(void)(ctx); \
99-
(void)(thread); \
100-
(void)(name); \
101-
} while (false)
102-
103-
#define COMMON_INTERCEPTOR_BLOCK_REAL(name) \
104-
do { \
105-
(void)(name); \
106-
} while (false)
107-
108-
#define COMMON_INTERCEPTOR_MEMMOVE_IMPL(ctx, to, from, size) \
109-
do { \
110-
(void)(ctx); \
111-
(void)(to); \
112-
(void)(from); \
113-
(void)(size); \
114-
} while (false)
115-
116-
#define COMMON_INTERCEPTOR_MEMCPY_IMPL(ctx, to, from, size) \
117-
do { \
118-
(void)(ctx); \
119-
(void)(to); \
120-
(void)(from); \
121-
(void)(size); \
122-
} while (false)
123-
124-
#define COMMON_INTERCEPTOR_MEMSET_IMPL(ctx, block, c, size) \
125-
do { \
126-
(void)(ctx); \
127-
(void)(block); \
128-
(void)(c); \
129-
(void)(size); \
130-
} while (false)
131-
132-
#define COMMON_INTERCEPTOR_STRERROR() \
133-
do { \
134-
} while (false)
135-
136-
#define COMMON_INTERCEPT_FUNCTION(name) \
137-
do { \
138-
(void)(name); \
139-
} while (false)
140-
141-
#pragma clang diagnostic push
142-
#pragma clang diagnostic ignored "-Wunused-function"
143-
#include "sanitizer_common/sanitizer_common_interceptors.inc"
144-
#pragma clang diagnostic pop
145-
14647
struct ThreadStartArg {
14748
__sanitizer_sigset_t starting_sigset_;
14849
};
@@ -416,10 +317,6 @@ void InitializeInterceptors() {
416317
static int inited = 0;
417318
CHECK_EQ(inited, 0);
418319

419-
(void)(InitializeCommonInterceptors);
420-
(void)(read_iovec);
421-
(void)(write_iovec);
422-
423320
# if HWASAN_WITH_INTERCEPTORS
424321
# if defined(__linux__)
425322
INTERCEPT_FUNCTION(__libc_longjmp);

0 commit comments

Comments
 (0)