/llvm-project/libc/src/unistd/linux/ |
H A D | dup2.cpp | 21 LLVM_LIBC_FUNCTION(int, dup2, (int oldfd, int newfd)) { 24 int ret = LIBC_NAMESPACE::syscall_impl<int>(SYS_dup2, oldfd, newfd); 27 // dup3 fails if oldfd is the same as newfd. So, we handle that case 29 if (oldfd == newfd) { 44 int ret = LIBC_NAMESPACE::syscall_impl<int>(SYS_dup3, oldfd, newfd, 0);
|
H A D | dup3.cpp | 20 LLVM_LIBC_FUNCTION(int, dup3, (int oldfd, int newfd, int flags)) { 22 int ret = LIBC_NAMESPACE::syscall_impl<int>(SYS_dup3, oldfd, newfd, flags);
|
/llvm-project/libc/src/spawn/ |
H A D | posix_spawn_file_actions_adddup2.cpp | 22 (posix_spawn_file_actions_t * actions, int fd, int newfd)) { 25 if (fd < 0 || newfd < 0) 29 auto *act = new (ac) SpawnFileDup2Action(fd, newfd);
|
H A D | file_actions.h | 64 int newfd; 68 newfd(new_fdesc) {} 63 int newfd; global() member
|
H A D | posix_spawn_file_actions_adddup2.h | 18 int fd, int newfd);
|
/llvm-project/libc/src/spawn/linux/ |
H A D | posix_spawn.cpp | 58 bool dup2(int fd, int newfd) { in dup2() 60 int ret = LIBC_NAMESPACE::syscall_impl<int>(SYS_dup2, fd, newfd); in dup2() 62 int ret = LIBC_NAMESPACE::syscall_impl<int>(SYS_dup3, fd, newfd, 0); in dup2() 113 if (!dup2(dup2_act->fd, dup2_act->newfd)) in child_process() 56 dup2(int fd,int newfd) dup2() argument
|
/llvm-project/compiler-rt/lib/tsan/rtl/ |
H A D | tsan_fd.cpp | 260 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write) { in FdDup() argument 261 DPrintf("#%d: FdDup(%d, %d)\n", thr->tid, oldfd, newfd); in FdDup() 262 if (bogusfd(oldfd) || bogusfd(newfd)) in FdDup() 267 FdClose(thr, pc, newfd, write); in FdDup() 268 init(thr, pc, newfd, ref(od->sync), write); in FdDup() 339 void FdSocketAccept(ThreadState *thr, uptr pc, int fd, int newfd) { in FdSocketAccept() argument 340 DPrintf("#%d: FdSocketAccept(%d, %d)\n", thr->tid, fd, newfd); in FdSocketAccept() 345 init(thr, pc, newfd, &fdctx.socksync); in FdSocketAccept()
|
H A D | tsan_fd.h | 46 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write); 54 void FdSocketAccept(ThreadState *thr, uptr pc, int fd, int newfd);
|
H A D | tsan_interceptors_posix.cpp | 1748 int newfd = REAL(dup)(oldfd); in TSAN_INTERCEPTOR() 1749 if (oldfd >= 0 && newfd >= 0 && newfd != oldfd) in TSAN_INTERCEPTOR() 1750 FdDup(thr, pc, oldfd, newfd, true); in TSAN_INTERCEPTOR() 1751 return newfd; in TSAN_INTERCEPTOR() 1754 TSAN_INTERCEPTOR(int, dup2, int oldfd, int newfd) { 1755 SCOPED_TSAN_INTERCEPTOR(dup2, oldfd, newfd); 1756 int newfd2 = REAL(dup2)(oldfd, newfd); 1763 TSAN_INTERCEPTOR(int, dup3, int oldfd, int newfd, int flags) { in TSAN_INTERCEPTOR() 1764 SCOPED_TSAN_INTERCEPTOR(dup3, oldfd, newfd, flag in TSAN_INTERCEPTOR() 1720 int newfd = REAL(dup)(oldfd); TSAN_INTERCEPTOR() local 1726 TSAN_INTERCEPTOR(int,dup2,int oldfd,int newfd) TSAN_INTERCEPTOR() argument 1735 TSAN_INTERCEPTOR(int,dup3,int oldfd,int newfd,int flags) TSAN_INTERCEPTOR() argument 2507 COMMON_INTERCEPTOR_FD_SOCKET_ACCEPT(ctx,fd,newfd) global() argument [all...] |
/llvm-project/libc/src/unistd/ |
H A D | dup2.h | 17 int dup2(int oldfd, int newfd);
|
H A D | dup3.h | 17 int dup3(int oldfd, int newfd, int flags);
|
/llvm-project/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_solaris.cpp | 141 DECLARE__REAL_AND_INTERNAL(uptr, dup2, int oldfd, int newfd) { in DECLARE__REAL_AND_INTERNAL() argument 142 return _REAL(dup2)(oldfd, newfd); in DECLARE__REAL_AND_INTERNAL()
|
H A D | sanitizer_netbsd.cpp | 187 uptr internal_dup2(int oldfd, int newfd) { in internal_dup2() argument 189 return _REAL(dup2, oldfd, newfd); in internal_dup2()
|
H A D | sanitizer_posix.h | 56 uptr internal_dup2(int oldfd, int newfd);
|
H A D | sanitizer_mac.cpp | 204 uptr internal_dup2(int oldfd, int newfd) { in internal_dup2() argument 205 return dup2(oldfd, newfd); in internal_dup2()
|
H A D | sanitizer_linux.cpp | 539 uptr internal_dup2(int oldfd, int newfd) { in DirExists() 541 return internal_syscall(SYSCALL(dup3), oldfd, newfd, 0); in DirExists() 543 return internal_syscall(SYSCALL(dup2), oldfd, newfd); in DirExists() 464 internal_dup2(int oldfd,int newfd) internal_dup2() argument
|
H A D | sanitizer_common_syscalls.inc | 1366 PRE_SYSCALL(dup2)(long oldfd, long newfd) {} 1368 POST_SYSCALL(dup2)(long res, long oldfd, long newfd) {} 1370 PRE_SYSCALL(dup3)(long oldfd, long newfd, long flags) {} 1372 POST_SYSCALL(dup3)(long res, long oldfd, long newfd, long flags) {}
|
/llvm-project/compiler-rt/lib/hwasan/ |
H A D | hwasan_interceptors.cpp | 124 # define COMMON_INTERCEPTOR_FD_SOCKET_ACCEPT(ctx, fd, newfd) \ argument 128 (void)(newfd); \
|
/llvm-project/compiler-rt/include/sanitizer/ |
H A D | linux_syscall_hooks.h | 730 #define __sanitizer_syscall_pre_dup2(oldfd, newfd) \ argument 731 __sanitizer_syscall_pre_impl_dup2((long)(oldfd), (long)(newfd)) 732 #define __sanitizer_syscall_post_dup2(res, oldfd, newfd) \ argument 733 __sanitizer_syscall_post_impl_dup2(res, (long)(oldfd), (long)(newfd)) 734 #define __sanitizer_syscall_pre_dup3(oldfd, newfd, flags) \ argument 735 __sanitizer_syscall_pre_impl_dup3((long)(oldfd), (long)(newfd), (long)(flags)) 736 #define __sanitizer_syscall_post_dup3(res, oldfd, newfd, flags) \ argument 737 __sanitizer_syscall_post_impl_dup3(res, (long)(oldfd), (long)(newfd), \ 2430 void __sanitizer_syscall_pre_impl_dup2(long oldfd, long newfd); 2431 void __sanitizer_syscall_post_impl_dup2(long res, long oldfd, long newfd); [all …]
|
/llvm-project/compiler-rt/lib/memprof/ |
H A D | memprof_interceptors.cpp | 79 #define COMMON_INTERCEPTOR_FD_SOCKET_ACCEPT(ctx, fd, newfd) \ argument
|
/llvm-project/compiler-rt/lib/asan/ |
H A D | asan_interceptors.cpp | 119 #define COMMON_INTERCEPTOR_FD_SOCKET_ACCEPT(ctx, fd, newfd) \ argument
|
/llvm-project/compiler-rt/lib/msan/ |
H A D | msan_interceptors.cpp | 1432 #define COMMON_INTERCEPTOR_FD_SOCKET_ACCEPT(ctx, fd, newfd) \ 1436 COMMON_INTERCEPTOR_FD_SOCKET_ACCEPT(ctx,fd,newfd) global() argument
|