hanchenye-llvm-project/compiler-rt/lib
H.J. Lu 6716f4af81 [sanitizers] Restore internal_readlink for x32
r316591 has

@@ -389,13 +383,11 @@ uptr internal_dup2(int oldfd, int newfd) {
 }

 uptr internal_readlink(const char *path, char *buf, uptr bufsize) {
-#if SANITIZER_NETBSD
-  return internal_syscall_ptr(SYSCALL(readlink), path, buf, bufsize);
-#elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS
+#if SANITIZER_USES_CANONICAL_LINUX_SYSCALLS
   return internal_syscall(SYSCALL(readlinkat), AT_FDCWD,
                           (uptr)path, (uptr)buf, bufsize);
 #else
-  return internal_syscall(SYSCALL(readlink), (uptr)path, (uptr)buf, bufsize);
+  return internal_syscall_ptr(SYSCALL(readlink), path, buf, bufsize);
 #endif
 }

which dropped the (uptr) cast and broke x32.  This patch puts back the
(uptr) cast to restore x32 and fixes:

https://bugs.llvm.org/show_bug.cgi?id=40783

Differential Revision: https://reviews.llvm.org/D58413

llvm-svn: 354451
2019-02-20 11:43:43 +00:00
..
BlocksRuntime [compiler-rt] Test commit: remove some trailing white spaces. 2017-08-25 19:36:30 +00:00
asan [compiler-rt] Cleanup usage of C++ ABI library 2019-02-16 08:34:26 +00:00
builtins [builtins] Do not set hidden attribute on Android 2019-01-23 01:59:35 +00:00
cfi [sanitizer] Decorate /proc/self/maps better. 2019-02-06 01:14:50 +00:00
dfsan Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
esan Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
fuzzer [compiler-rt] Fix broken sanitizer bots (hopefully) 2019-02-17 18:47:33 +00:00
hwasan [compiler-rt] Cleanup usage of C++ ABI library 2019-02-16 08:34:26 +00:00
interception Commit macro intended to be included in r353483. 2019-02-07 23:57:21 +00:00
lsan sanitizers: Introduce ThreadType enum 2019-02-07 11:01:22 +00:00
msan [compiler-rt] Build custom libcxx with libcxxabi 2019-02-17 12:16:20 +00:00
profile Set hidden attribute on lprofMergeValueProfData 2019-02-14 21:38:40 +00:00
safestack [safestack] Explain why tinfo at the end of the buffer 2019-02-07 23:20:47 +00:00
sanitizer_common [sanitizers] Restore internal_readlink for x32 2019-02-20 11:43:43 +00:00
scudo [compiler-rt] Cleanup usage of C++ ABI library 2019-02-16 08:34:26 +00:00
stats Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
tsan [Sanitizer] On Darwin `__sanitizer_print_stack_trace` only prints topmost frame 2019-02-18 18:47:49 +00:00
ubsan [Sanitizer] On Darwin `__sanitizer_print_stack_trace` only prints topmost frame 2019-02-18 18:47:49 +00:00
ubsan_minimal [compiler-rt][UBSan] Sanitization for alignment assumptions. 2019-01-15 09:44:27 +00:00
xray [compiler-rt] Cleanup usage of C++ ABI library 2019-02-16 08:34:26 +00:00
CMakeLists.txt [scudo] Initial standalone skeleton check-in 2019-02-04 16:25:40 +00:00