gcc/libsanitizer
H.J. Lu 4dfc5b351f libsanitizer: Restore internal_readlink for x32
Cherry-pick compiler-rt revision 354451:

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

	PR sanitizer/89409
	* sanitizer_common/sanitizer_linux.cc (internal_readlink):
	Cherry-pick compiler-rt r354451.

From-SVN: r269042
2019-02-20 08:20:50 -08:00
..
asan Cherry pick libsanitizer patch (https://reviews.llvm.org/D54856). 2018-12-27 09:47:20 +00:00
builtins
include
interception
libbacktrace
lsan
sanitizer_common libsanitizer: Restore internal_readlink for x32 2019-02-20 08:20:50 -08:00
tsan
ubsan
ChangeLog libsanitizer: Restore internal_readlink for x32 2019-02-20 08:20:50 -08:00
HOWTO_MERGE
LICENSE.TXT
LOCAL_PATCHES Include patch in LOCAL_PATCHES. 2018-11-09 09:21:56 +00:00
MERGE
Makefile.am
Makefile.in
README.gcc re PR sanitizer/89010 (Update URLs in libsanitizer/README.gcc) 2019-01-23 14:18:50 +01:00
acinclude.m4
aclocal.m4
config.h.in
configure
configure.ac
configure.tgt Enable libsanitizer on Solaris (PR sanitizer/80953) 2018-11-06 10:49:34 +00:00
libsanitizer.spec.in
libtool-version
merge.sh

README.gcc

AddressSanitizer and ThreadSanitizer (https://github.com/google/sanitizers) are
projects initially developed by Google Inc.

Both tools consist of a compiler module and a run-time library.
The sources of the run-time library for these projects are hosted at
https://llvm.org/svn/llvm-project/compiler-rt in the following directories:
  include/sanitizer
  lib/sanitizer_common
  lib/interception
  lib/asan
  lib/tsan
  lib/lsan
  lib/ubsan

Trivial and urgent fixes (portability, build fixes, etc.) may go directly to the
GCC tree.  All non-trivial changes, functionality improvements, etc. should go
through the upstream tree first and then be merged back to the GCC tree.
The merges from upstream should be done with the aid of the merge.sh script;
it will also update the file MERGE to contain the upstream revision
we merged with.