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 ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch builtins... 2017-10-19 13:23:59 +02:00
include backport: All source files: Merge from upstream 345033. 2018-10-31 11:14:23 +00:00
interception Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
libbacktrace Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
lsan Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
sanitizer_common libsanitizer: Restore internal_readlink for x32 2019-02-20 08:20:50 -08:00
tsan Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
ubsan Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
ChangeLog libsanitizer: Restore internal_readlink for x32 2019-02-20 08:20:50 -08:00
HOWTO_MERGE Update merge script and HOWTO_MERGE documentation. 2018-10-31 11:09:26 +00:00
LICENSE.TXT
LOCAL_PATCHES Include patch in LOCAL_PATCHES. 2018-11-09 09:21:56 +00:00
MERGE backport: All source files: Merge from upstream 345033. 2018-10-31 11:14:23 +00:00
Makefile.am Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
Makefile.in Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
README.gcc re PR sanitizer/89010 (Update URLs in libsanitizer/README.gcc) 2019-01-23 14:18:50 +01:00
acinclude.m4 Enable building libsanitizer with Intel CET 2017-11-17 22:34:50 +01:00
aclocal.m4 Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
config.h.in Update build system: include new files and run autoheader, autoconf, automake 2018-10-31 11:15:57 +00:00
configure Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
configure.ac Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
configure.tgt Enable libsanitizer on Solaris (PR sanitizer/80953) 2018-11-06 10:49:34 +00:00
libsanitizer.spec.in
libtool-version
merge.sh Update merge script and HOWTO_MERGE documentation. 2018-10-31 11:09:26 +00:00

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.