hanchenye-llvm-project/compiler-rt
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
..
cmake [compiler-rt][CMake] Set project for the custom libc++ 2019-02-19 16:53:33 +00:00
docs
include tsan: add fiber support 2019-02-13 13:21:24 +00:00
lib [sanitizers] Restore internal_readlink for x32 2019-02-20 11:43:43 +00:00
test [msan] Fix name_to_handle_at test on overlayfs. 2019-02-19 23:41:42 +00:00
unittests [XRay] Add LD_LIBRARY_PATH to env variables for Unit Tests 2018-09-27 23:15:05 +00:00
utils Update the ioctl(2) list in sanitizers with NetBSD 8.99.34 2019-02-05 22:20:25 +00:00
www Adjust documentation for git migration. 2019-01-29 16:37:27 +00:00
.arcconfig [compiler-rt] Set up .arcconfig to point to new Diffusion CRT repository 2017-12-06 20:55:32 +00:00
.gitignore
CMakeLists.txt [compiler-rt] Build custom libcxx with libcxxabi 2019-02-17 12:16:20 +00:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
README.txt

README.txt

Compiler-RT
================================

This directory and its subdirectories contain source code for the compiler
support routines.

Compiler-RT is open source software. You may freely distribute it under the
terms of the license agreement found in LICENSE.txt.

================================