Home
last modified time | relevance | path

Searched full:interceptor (Results 1 – 25 of 72) sorted by relevance

123

/freebsd/contrib/llvm-project/compiler-rt/lib/rtsan/
H A Drtsan_interceptors_posix.cpp57 INTERCEPTOR(int, open, const char *path, int oflag, ...) { in INTERCEPTOR() function
77 INTERCEPTOR(int, open64, const char *path, int oflag, ...) { in INTERCEPTOR() function
96 INTERCEPTOR(int, openat, int fd, const char *path, int oflag, ...) { in INTERCEPTOR() function
112 INTERCEPTOR(int, openat64, int fd, const char *path, int oflag, ...) { in INTERCEPTOR() function
131 INTERCEPTOR(int, creat, const char *path, mode_t mode) { in INTERCEPTOR() function
139 INTERCEPTOR(int, creat64, const char *path, mode_t mode) { in INTERCEPTOR() function
150 INTERCEPTOR(int, fcntl, int filedes, int cmd, ...) { in INTERCEPTOR() function
175 // https://discourse.llvm.org/t/how-to-write-an-interceptor-for-fcntl/81203 in INTERCEPTOR()
188 INTERCEPTOR(int, ioctl, int filedes, int request, ...) { function
190 INTERCEPTOR(int, ioctl, int filedes, unsigned long request, ...) {
[all …]
/freebsd/contrib/llvm-project/compiler-rt/lib/lsan/
H A Dlsan_interceptors.cpp70 INTERCEPTOR(void*, malloc, uptr size) { in INTERCEPTOR() function
78 INTERCEPTOR(void, free, void *p) { in INTERCEPTOR() function
88 INTERCEPTOR(void, free_sized, void *p, uptr size) { in INTERCEPTOR() function
102 INTERCEPTOR(void, free_aligned_sized, void *p, uptr alignment, uptr size) { in INTERCEPTOR() function
116 INTERCEPTOR(void*, calloc, uptr nmemb, uptr size) { in INTERCEPTOR() function
124 INTERCEPTOR(void *, realloc, void *ptr, uptr size) { in INTERCEPTOR() function
132 INTERCEPTOR(void*, reallocarray, void *q, uptr nmemb, uptr size) { in INTERCEPTOR() function
138 INTERCEPTOR(int, posix_memalign, void **memptr, uptr alignment, uptr size) { in INTERCEPTOR() function
144 INTERCEPTOR(void*, valloc, uptr size) { in INTERCEPTOR() function
155 INTERCEPTOR(void*, memalign, uptr alignment, uptr size) { in INTERCEPTOR() function
[all …]
H A Dlsan_mac.cpp107 // Define interceptor for dispatch_*_f function with the three most common
110 INTERCEPTOR(void, dispatch_x_f, dispatch_queue_t dq, void *ctxt, \
121 INTERCEPTOR(void, dispatch_after_f, dispatch_time_t when, dispatch_queue_t dq, in INTERCEPT_DISPATCH_X_F_3()
128 INTERCEPTOR(void, dispatch_group_async_f, dispatch_group_t group, in INTERCEPTOR() function
156 INTERCEPTOR(void, dispatch_async, dispatch_queue_t dq, void (^work)(void)) {
161 INTERCEPTOR(void, dispatch_group_async, dispatch_group_t dg,
167 INTERCEPTOR(void, dispatch_after, dispatch_time_t when, dispatch_queue_t queue,
173 INTERCEPTOR(void, dispatch_source_set_cancel_handler, dispatch_source_t ds,
183 INTERCEPTOR(void, dispatch_source_set_event_handler, dispatch_source_t ds,
/freebsd/contrib/llvm-project/compiler-rt/lib/tsan/dd/
H A Ddd_interceptors.cpp43 INTERCEPTOR(int, pthread_mutex_destroy, pthread_mutex_t *m) { in INTERCEPTOR() function
49 INTERCEPTOR(int, pthread_mutex_lock, pthread_mutex_t *m) { in INTERCEPTOR() function
57 INTERCEPTOR(int, pthread_mutex_trylock, pthread_mutex_t *m) { in INTERCEPTOR() function
65 INTERCEPTOR(int, pthread_mutex_unlock, pthread_mutex_t *m) { in INTERCEPTOR() function
71 INTERCEPTOR(int, pthread_spin_destroy, pthread_spinlock_t *m) { in INTERCEPTOR() function
78 INTERCEPTOR(int, pthread_spin_lock, pthread_spinlock_t *m) { in INTERCEPTOR() function
86 INTERCEPTOR(int, pthread_spin_trylock, pthread_spinlock_t *m) { in INTERCEPTOR() function
94 INTERCEPTOR(int, pthread_spin_unlock, pthread_spinlock_t *m) { in INTERCEPTOR() function
100 INTERCEPTOR(int, pthread_rwlock_destroy, pthread_rwlock_t *m) { in INTERCEPTOR() function
106 INTERCEPTOR(int, pthread_rwlock_rdlock, pthread_rwlock_t *m) { in INTERCEPTOR() function
[all …]
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_common_interceptors.inc12 // This file should be included into the tool's interceptor file,
414 INTERCEPTOR(SIZE_T, strlen, const char *s) {
434 INTERCEPTOR(SIZE_T, strnlen, const char *s, SIZE_T maxlen) {
448 INTERCEPTOR(char*, strndup, const char *s, usize size) {
458 INTERCEPTOR(char*, __strndup, const char *s, usize size) {
468 INTERCEPTOR(char*, textdomain, const char *domainname) {
494 INTERCEPTOR(int, strcmp, const char *s1, const char *s2) {
518 INTERCEPTOR(int, strncmp, const char *s1, const char *s2, usize size) {
561 INTERCEPTOR(int, strcasecmp, const char *s1, const char *s2) {
583 INTERCEPTOR(int, strncasecmp, const char *s1, const char *s2, SIZE_T size) {
[all …]
H A Dsanitizer_common_interceptors_memintrinsics.inc16 // This file should be included into the tool's memintrinsic interceptor file,
87 INTERCEPTOR(void *, memset, void *dst, int v, usize size) {
98 INTERCEPTOR(void *, memmove, void *dst, const void *src, usize size) {
109 INTERCEPTOR(void *, memcpy, void *dst, const void *src, usize size) {
138 INTERCEPTOR(void *, __aeabi_memmove, void *to, const void *from, usize size) {
143 INTERCEPTOR(void *, __aeabi_memmove4, void *to, const void *from, usize size) {
148 INTERCEPTOR(void *, __aeabi_memmove8, void *to, const void *from, usize size) {
153 INTERCEPTOR(void *, __aeabi_memcpy, void *to, const void *from, usize size) {
158 INTERCEPTOR(void *, __aeabi_memcpy4, void *to, const void *from, usize size) {
163 INTERCEPTOR(void *, __aeabi_memcpy8, void *to, const void *from, usize size) {
[all …]
H A Dsanitizer_malloc_mac.inc56 INTERCEPTOR(malloc_zone_t *, malloc_create_zone,
73 INTERCEPTOR(void, malloc_destroy_zone, malloc_zone_t *zone) {
86 INTERCEPTOR(malloc_zone_t *, malloc_default_zone, void) {
91 INTERCEPTOR(malloc_zone_t *, malloc_zone_from_ptr, const void *ptr) {
100 INTERCEPTOR(malloc_zone_t *, malloc_default_purgeable_zone, void) {
107 INTERCEPTOR(void, malloc_make_purgeable, void *ptr) {
113 INTERCEPTOR(int, malloc_make_nonpurgeable, void *ptr) {
122 INTERCEPTOR(void, malloc_set_zone_name, malloc_zone_t *zone, const char *name) {
135 INTERCEPTOR(void *, malloc, size_t size) {
141 INTERCEPTOR(void, free, void *ptr) {
[all …]
H A Dsanitizer_common_interceptors_netbsd_compat.inc33 INTERCEPTOR(int, statvfs, char *path, void *buf) {
45 INTERCEPTOR(int, fstatvfs, int fd, void *buf) {
68 INTERCEPTOR(int, __getmntinfo13, void **mntbufp, int flags) {
85 INTERCEPTOR(int, getvfsstat, void *buf, SIZE_T bufsize, int flags) {
99 INTERCEPTOR(int, statvfs1, const char *path, void *buf, int flags) {
108 INTERCEPTOR(int, fstatvfs1, int fd, void *buf, int flags) {
/freebsd/contrib/llvm-project/compiler-rt/lib/dfsan/
H A Ddfsan_interceptors.cpp37 INTERCEPTOR(void *, reallocarray, void *ptr, SIZE_T nmemb, SIZE_T size) { in INTERCEPTOR() function
41 INTERCEPTOR(void *, __libc_memalign, SIZE_T alignment, SIZE_T size) { in INTERCEPTOR() function
45 INTERCEPTOR(void *, aligned_alloc, SIZE_T alignment, SIZE_T size) { in INTERCEPTOR() function
49 INTERCEPTOR(void *, calloc, SIZE_T nmemb, SIZE_T size) { in INTERCEPTOR() function
55 INTERCEPTOR(void *, realloc, void *ptr, SIZE_T size) { in INTERCEPTOR() function
61 INTERCEPTOR(void *, malloc, SIZE_T size) { in INTERCEPTOR() function
67 INTERCEPTOR(void, free, void *ptr) { in INTERCEPTOR() function
75 INTERCEPTOR(void, cfree, void *ptr) { in INTERCEPTOR() function
83 INTERCEPTOR(int, posix_memalign, void **memptr, SIZE_T alignment, SIZE_T size) { in INTERCEPTOR() function
91 INTERCEPTOR(void *, memalign, SIZE_T alignment, SIZE_T size) { in INTERCEPTOR() function
[all …]
/freebsd/contrib/llvm-project/compiler-rt/lib/memprof/
H A Dmemprof_malloc_linux.cpp37 INTERCEPTOR(void, free, void *ptr) { in INTERCEPTOR() function
45 INTERCEPTOR(void, cfree, void *ptr) { in INTERCEPTOR() function
53 INTERCEPTOR(void *, malloc, uptr size) { in INTERCEPTOR() function
61 INTERCEPTOR(void *, calloc, uptr nmemb, uptr size) { in INTERCEPTOR() function
69 INTERCEPTOR(void *, realloc, void *ptr, uptr size) { in INTERCEPTOR() function
78 INTERCEPTOR(void *, reallocarray, void *ptr, uptr nmemb, uptr size) { in INTERCEPTOR() function
86 INTERCEPTOR(void *, memalign, uptr boundary, uptr size) { in INTERCEPTOR() function
91 INTERCEPTOR(void *, __libc_memalign, uptr boundary, uptr size) { in INTERCEPTOR() function
98 INTERCEPTOR(void *, aligned_alloc, uptr boundary, uptr size) { in INTERCEPTOR() function
104 INTERCEPTOR(uptr, malloc_usable_size, void *ptr) { in INTERCEPTOR() function
[all …]
H A Dmemprof_interceptors.cpp134 INTERCEPTOR(int, pthread_create, void *thread, void *attr, in INTERCEPTOR() function
165 INTERCEPTOR(int, pthread_join, void *t, void **arg) { in INTERCEPTOR() function
171 INTERCEPTOR(char *, index, const char *string, int c)
176 INTERCEPTOR(char *, strcat, char *to, const char *from) { in INTERCEPTOR() function
188 INTERCEPTOR(char *, strncat, char *to, const char *from, usize size) { in INTERCEPTOR() function
201 INTERCEPTOR(char *, strcpy, char *to, const char *from) { in INTERCEPTOR() function
214 INTERCEPTOR(char *, strdup, const char *s) { in INTERCEPTOR() function
228 INTERCEPTOR(char *, __strdup, const char *s) { in INTERCEPTOR() function
242 INTERCEPTOR(char *, strncpy, char *to, const char *from, usize size) { in INTERCEPTOR() function
252 INTERCEPTOR(long, strtol, const char *nptr, char **endptr, int base) { in INTERCEPTOR() function
[all …]
/freebsd/contrib/llvm-project/compiler-rt/lib/msan/
H A Dmsan_interceptors.cpp66 // True if this is a nested interceptor.
111 // interceptor.
125 INTERCEPTOR(SIZE_T, fread_unlocked, void *ptr, SIZE_T size, SIZE_T nmemb, in INTERCEPTOR() function
139 INTERCEPTOR(void *, mempcpy, void *dest, const void *src, SIZE_T n) { in INTERCEPTOR() function
147 INTERCEPTOR(void *, memccpy, void *dest, const void *src, int c, SIZE_T n) { in INTERCEPTOR() function
157 INTERCEPTOR(void *, bcopy, const void *src, void *dest, SIZE_T n) { in INTERCEPTOR() function
161 INTERCEPTOR(int, posix_memalign, void **memptr, SIZE_T alignment, SIZE_T size) { in INTERCEPTOR() function
171 INTERCEPTOR(void *, memalign, SIZE_T alignment, SIZE_T size) { in INTERCEPTOR() function
180 INTERCEPTOR(void *, aligned_alloc, SIZE_T alignment, SIZE_T size) { in INTERCEPTOR() function
186 INTERCEPTOR(void *, __libc_memalign, SIZE_T alignment, SIZE_T size) { in INTERCEPTOR() function
[all …]
/freebsd/contrib/llvm-project/compiler-rt/lib/nsan/
H A Dnsan_interceptors.cpp11 // A note about `printf`: Make sure none of the interceptor code calls any
31 INTERCEPTOR(void *, memset, void *dst, int v, usize size) { in INTERCEPTOR() function
42 INTERCEPTOR(wchar_t *, wmemset, wchar_t *dst, wchar_t v, usize size) { in INTERCEPTOR() function
48 INTERCEPTOR(void *, memmove, void *dst, const void *src, usize size) { in INTERCEPTOR() function
60 INTERCEPTOR(wchar_t *, wmemmove, wchar_t *dst, const wchar_t *src, usize size) { in INTERCEPTOR() function
66 INTERCEPTOR(void *, memcpy, void *dst, const void *src, usize size) { in INTERCEPTOR() function
81 INTERCEPTOR(wchar_t *, wmemcpy, wchar_t *dst, const wchar_t *src, usize size) { in INTERCEPTOR() function
87 INTERCEPTOR(char *, strfry, char *s) { in INTERCEPTOR() function
95 INTERCEPTOR(char *, strsep, char **Stringp, const char *delim) { in INTERCEPTOR() function
104 INTERCEPTOR(char *, strtok, char *str, const char *delim) { in INTERCEPTOR() function
[all …]
H A Dnsan_malloc_linux.cpp32 INTERCEPTOR(void *, aligned_alloc, uptr align, uptr size) { in INTERCEPTOR() function
36 INTERCEPTOR(void *, calloc, uptr nmemb, uptr size) { in INTERCEPTOR() function
42 INTERCEPTOR(void, free, void *ptr) { in INTERCEPTOR() function
50 INTERCEPTOR(void *, malloc, uptr size) { in INTERCEPTOR() function
56 INTERCEPTOR(void *, realloc, void *ptr, uptr size) { in INTERCEPTOR() function
63 INTERCEPTOR(void *, reallocarray, void *ptr, uptr nmemb, uptr size) { in INTERCEPTOR() function
68 INTERCEPTOR(int, posix_memalign, void **memptr, uptr align, uptr size) { in INTERCEPTOR() function
74 INTERCEPTOR(void *, memalign, uptr align, uptr size) { in INTERCEPTOR() function
78 INTERCEPTOR(void *, __libc_memalign, uptr align, uptr size) { in INTERCEPTOR() function
/freebsd/contrib/llvm-project/compiler-rt/lib/tysan/
H A Dtysan_interceptors.cpp38 INTERCEPTOR(void *, memset, void *dst, int v, uptr size) { in INTERCEPTOR() function
47 INTERCEPTOR(void *, memmove, void *dst, const void *src, uptr size) { in INTERCEPTOR() function
56 INTERCEPTOR(void *, memcpy, void *dst, const void *src, uptr size) { in INTERCEPTOR() function
68 INTERCEPTOR(void *, mmap, void *addr, SIZE_T length, int prot, int flags, in INTERCEPTOR() function
77 INTERCEPTOR(void *, mmap64, void *addr, SIZE_T length, int prot, int flags, in INTERCEPTOR() function
86 INTERCEPTOR(char *, strdup, const char *s) { in INTERCEPTOR() function
94 INTERCEPTOR(char *, __strdup, const char *s) { in INTERCEPTOR() function
102 INTERCEPTOR(void *, malloc, uptr size) { in INTERCEPTOR() function
112 INTERCEPTOR(uptr, malloc_size, void *ptr) { in INTERCEPTOR() function
119 INTERCEPTOR(void *, realloc, void *ptr, uptr size) { in INTERCEPTOR() function
[all …]
/freebsd/contrib/llvm-project/compiler-rt/lib/asan/
H A Dasan_malloc_linux.cpp48 INTERCEPTOR(void, free, void *ptr) { in INTERCEPTOR() function
56 INTERCEPTOR(void, cfree, void *ptr) { in INTERCEPTOR() function
64 INTERCEPTOR(void*, malloc, uptr size) { in INTERCEPTOR() function
71 INTERCEPTOR(void*, calloc, uptr nmemb, uptr size) { in INTERCEPTOR() function
78 INTERCEPTOR(void*, realloc, void *ptr, uptr size) { in INTERCEPTOR() function
86 INTERCEPTOR(void*, reallocarray, void *ptr, uptr nmemb, uptr size) { in INTERCEPTOR() function
94 INTERCEPTOR(void*, memalign, uptr boundary, uptr size) { in INTERCEPTOR() function
99 INTERCEPTOR(void*, __libc_memalign, uptr boundary, uptr size) { in INTERCEPTOR() function
106 INTERCEPTOR(void*, aligned_alloc, uptr boundary, uptr size) { in INTERCEPTOR() function
112 INTERCEPTOR(uptr, malloc_usable_size, void *ptr) { in INTERCEPTOR() function
[all …]
H A Dasan_interceptors.cpp244 INTERCEPTOR(int, pthread_create, void *thread, void *attr, in INTERCEPTOR() function
290 INTERCEPTOR(int, pthread_join, void *thread, void **retval) { in INTERCEPTOR() function
299 INTERCEPTOR(int, pthread_detach, void *thread) { in INTERCEPTOR() function
308 INTERCEPTOR(void, pthread_exit, void *retval) { in INTERCEPTOR() function
314 INTERCEPTOR(int, pthread_tryjoin_np, void *thread, void **ret) { in INTERCEPTOR() function
325 INTERCEPTOR(int, pthread_timedjoin_np, void *thread, void **ret, in INTERCEPTOR() function
359 INTERCEPTOR(void, __makecontext_v2, struct ucontext_t *ucp, void (*func)(), function
362 INTERCEPTOR(void, makecontext, struct ucontext_t *ucp, void (*func)(), int argc,
399 INTERCEPTOR(int, swapcontext, struct ucontext_t *oucp, function
435 INTERCEPTOR(void, longjmp, void *env, int val) { function
[all …]
H A Dasan_mac.cpp199 // Define interceptor for dispatch_*_f function with the three most common
202 INTERCEPTOR(void, dispatch_x_f, dispatch_queue_t dq, void *ctxt, \
219 INTERCEPTOR(void, dispatch_after_f, dispatch_time_t when, in INTERCEPT_DISPATCH_X_F_3()
232 INTERCEPTOR(void, dispatch_group_async_f, dispatch_group_t group, in INTERCEPTOR() function
269 INTERCEPTOR(void, dispatch_async,
276 INTERCEPTOR(void, dispatch_group_async,
283 INTERCEPTOR(void, dispatch_after,
290 INTERCEPTOR(void, dispatch_source_set_cancel_handler,
301 INTERCEPTOR(void, dispatch_source_set_event_handler,
308 INTERCEPTOR(void *, dispatch_mach_create, const char *label, in INTERCEPTOR() function
[all …]
H A Dasan_new_delete.cpp140 INTERCEPTOR(void *, _Znwm, size_t size) { OPERATOR_NEW_BODY; } in INTERCEPTOR() function
141 INTERCEPTOR(void *, _Znam, size_t size) { OPERATOR_NEW_BODY_ARRAY; } in INTERCEPTOR() function
142 INTERCEPTOR(void *, _ZnwmRKSt9nothrow_t, size_t size, std::nothrow_t const&) { in INTERCEPTOR() function
145 INTERCEPTOR(void *, _ZnamRKSt9nothrow_t, size_t size, std::nothrow_t const&) { in INTERCEPTOR() function
225 INTERCEPTOR(void, _ZdlPv, void *ptr) { OPERATOR_DELETE_BODY; } in INTERCEPTOR() function
226 INTERCEPTOR(void, _ZdaPv, void *ptr) { OPERATOR_DELETE_BODY_ARRAY; } in INTERCEPTOR() function
227 INTERCEPTOR(void, _ZdlPvRKSt9nothrow_t, void *ptr, std::nothrow_t const &) { in INTERCEPTOR() function
230 INTERCEPTOR(void, _ZdaPvRKSt9nothrow_t, void *ptr, std::nothrow_t const &) { in INTERCEPTOR() function
/freebsd/contrib/llvm-project/compiler-rt/lib/interception/
H A Dinterception.h26 // These typedefs should be used only in the interceptor definitions to replace
47 // How to add an interceptor:
51 // 1) define INTERCEPTOR(int, foo, const char *bar, double baz) { ... } in
58 // By default, REAL(foo) will be visible only inside your interceptor, and if
63 // INTERCEPTOR(..., foo, ...) are in different files, you'll instead need to:
67 // Notes: 1. Things may not work properly if macro INTERCEPTOR(...) {...} or
72 // INTERCEPTOR(int, foo, const char *bar, double baz) {...}
91 // function "func", the interceptor implementation is in ___interceptor_func,
95 // Most user interceptors should define a foreign interceptor as follows:
101 // In rare cases, a foreign interceptor (of another dynamic analysis runtime)
[all …]
/freebsd/contrib/llvm-project/compiler-rt/lib/hwasan/
H A Dhwasan_interceptors.cpp168 // The main purpose of the mmap interceptor is to prevent the user from
268 INTERCEPTOR(int, pthread_create, void *thread, void *attr, in INTERCEPTOR() function
293 INTERCEPTOR(int, pthread_join, void *thread, void **retval) { in INTERCEPTOR() function
302 INTERCEPTOR(int, pthread_detach, void *thread) { in INTERCEPTOR() function
311 INTERCEPTOR(void, pthread_exit, void *retval) { in INTERCEPTOR() function
317 INTERCEPTOR(int, pthread_tryjoin_np, void *thread, void **ret) { in INTERCEPTOR() function
326 INTERCEPTOR(int, pthread_timedjoin_np, void *thread, void **ret, in INTERCEPTOR() function
466 INTERCEPTOR(void, siglongjmp, __hw_sigjmp_buf env, int val) { in INTERCEPTOR() function
483 INTERCEPTOR(void, __libc_longjmp, __hw_jmp_buf env, int val) { in INTERCEPTOR() function
489 INTERCEPTOR(void, longjmp, __hw_jmp_buf env, int val) { in INTERCEPTOR() function
/freebsd/contrib/llvm-project/compiler-rt/lib/tsan/rtl/
H A Dtsan_rtl_loongarch64.S31 // call tsan interceptor
79 // call tsan interceptor
127 // call tsan interceptor
175 // call tsan interceptor
H A Dtsan_rtl_amd64.S41 // call tsan interceptor
83 // call tsan interceptor
132 // call tsan interceptor
187 // call tsan interceptor
H A Dtsan_rtl_aarch64.S39 // call tsan interceptor
90 // call tsan interceptor
142 // call tsan interceptor
195 // call tsan interceptor
H A Dtsan_rtl_mips64.S29 // call tsan interceptor
81 // call tsan interceptor
134 // call tsan interceptor
188 // call tsan interceptor

123