Commit Graph

157 Commits

Author SHA1 Message Date
Andrew Pinski 32377c1019 Fix PR 62157: disclean in libsanitizer not working
So what is happening is DIST_SUBDIRS contains the conditional
directories which is wrong, so we need to force DIST_SUBDIRS
to be the same as SUBDIRS as recommened by the automake manual.

OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
Also now make distclean works inside libsanitizer directory.

libsanitizer/ChangeLog:

	PR sanitizer/62157
	* Makefile.am: Force DIST_SUBDIRS to be SUBDIRS.
	* Makefile.in: Regenerate.
	* asan/Makefile.in: Likewise.
	* hwasan/Makefile.in: Likewise.
	* interception/Makefile.in: Likewise.
	* libbacktrace/Makefile.in: Likewise.
	* lsan/Makefile.in: Likewise.
	* sanitizer_common/Makefile.in: Likewise.
	* tsan/Makefile.in: Likewise.
	* ubsan/Makefile.in: Likewise.
2021-11-28 22:40:36 +00:00
Jakub Jelinek edd2249b17 libsanitizer: Fix bootstrap on FreeBSD [PR102675]
Here is an alternative to the patch changing a file imported from
compiler-rt upstream, so that we don't need to cary a local patch for that
particular problem.

2021-11-18  Jakub Jelinek  <jakub@redhat.com>

	PR bootstrap/102675
	* sanitizer_common/Makefile.am: Use -DUSE_SYSTEM_MD5 in AM_CXXFLAGS
	of sanitizer_platform_limits_freebsd.cpp.
	* sanitizer_common/Makefile.in: Regenerated.
2021-11-18 10:08:03 +01:00
H.J. Lu 55b43a22ab libsanitizer: Apply local patches 2021-11-13 05:15:25 -08:00
H.J. Lu 86289a4ff4 libsanitizer: Merge with upstream
Merged revision: 82bc6a094e85014f1891ef9407496f44af8fe442

with the fix for PR sanitizer/102911
2021-11-13 05:15:24 -08:00
H.J. Lu 5f0a3fb08c libsanitizer: Apply local patches 2021-11-05 18:21:29 +01:00
Martin Liska 2afc8f0b91 libsanitizer: merge from master (78d3e0a4f1406b17cdecc77540e09210670fe9a9). 2021-11-05 18:21:27 +01:00
H.J. Lu 65ade6a34c libsanitizer: Apply local patches 2021-11-04 13:26:17 +01:00
Martin Liska 0cedf1fb76 lisanitizer: Apply autoreconf. 2021-11-04 13:26:05 +01:00
Martin Liska cb0437584b libsanitizer: merge from master (c86b4503a94c277534ce4b9a5c015a6ac151b98a). 2021-11-04 13:24:53 +01:00
H.J. Lu bb8adf080e libsanitizer: Apply local patches 2021-10-06 13:08:47 -07:00
H.J. Lu 2e3d50c095 libsanitizer: Merge with upstream
Merged revision: fdf4c035225de52f596899931b1f6100e5e3e928
2021-10-06 13:08:47 -07:00
H.J. Lu 488efba0ab libsanitizer: Apply local patches 2021-10-01 09:02:54 -07:00
H.J. Lu 76288e1c5d libsanitizer: Merge with upstream
Merged revision: 1c2e5fd66ea27d0c51360ba4e22099124a915562
2021-10-01 09:02:54 -07:00
Jakub Jelinek 0e6017f5b4 sanitizer: Cherry-pick realpath fix
tsan in some cases starts ignoring interceptors and only calls the
intercepted functions.  But for realpath the behavior for NULL second argument
was only handled in the interceptor and intercepted function was the one
found by dlsym which is often one that doesn't handle NULL as second argument.

Fixed by using dlvsym with "GLIBC_2.3" if possible for intercepted function
and don't emulate behavior in the wrapper.

2021-08-11  Jakub Jelinek  <jakub@redhat.com>

	* sanitizer_common/sanitizer_common_interceptors.inc: Cherry-pick
	llvm-project revision faef0d042f523357fe5590e7cb6a8391cf0351a8.
2021-08-11 10:23:34 +02:00
H.J. Lu 1388232dc1 libsanitizer: Apply local patches 2021-07-20 14:21:51 -07:00
H.J. Lu 90e46074e6 libsanitizer: Merge with upstream
Merged revision: 7704fedfff6ef5676adb6415f3be0ac927d1a746
2021-07-20 14:21:51 -07:00
Tamar Christina 745dae5923 libsanitizer: Remove cyclades from libsanitizer
The Linux kernel has removed the interface to cyclades from
the latest kernel headers[1] due to them being orphaned for the
past 13 years.

libsanitizer uses this header when compiling against glibc, but
glibcs itself doesn't seem to have any references to cyclades.

Further more it seems that the driver is broken in the kernel and
the firmware doesn't seem to be available anymore.

As such since this is breaking the build of libsanitizer (and so the
GCC bootstrap[2]) I propose to remove this.

[1] https://lkml.org/lkml/2021/3/2/153
[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100379

(cherry picked from commit f7c5351552387bd43f6ca3631016d7f0dfe0f135)

libsanitizer/ChangeLog:

	PR sanitizer/100379
	* sanitizer_common/sanitizer_common_interceptors_ioctl.inc: Cherry-pick
	llvm-project revision f7c5351552387bd43f6ca3631016d7f0dfe0f135.
	* sanitizer_common/sanitizer_platform_limits_posix.cpp: Likewise.
	* sanitizer_common/sanitizer_platform_limits_posix.h: Likewise.
2021-05-21 10:30:59 +01:00
H.J. Lu f3b1516d9d libsanitizer: cherry-pick from upstream
cherry-pick:

72797dedb720 [sanitizer] Use size_t on g_tls_size to fix build on x32
2021-05-13 18:23:55 -07:00
Iain Sandoe adab7b2bf4 libsanitizer, Darwin : Handle missing __builtin_os_log_format.
GCC does not, currently, define __builtin_os_log_format, which
is needed by os/log.h.  Do not include that header unless the
builtin is defined (since the header errors out on the same
condition).  Provide a work-around solution to the missing API
provided via the header.

libsanitizer/ChangeLog:

	* sanitizer_common/sanitizer_mac.cpp : Check for the
	availability of __builtin_os_log_format before trying to
	include a header depending on it.
	(OS_LOG_DEFAULT): New.
	(os_log_error): Define to a fall-back using an older API.
2021-05-13 21:18:18 +01:00
Martin Liska fb73b1ce36 libsanitizer: Apply local patches. 2021-05-13 09:29:50 +02:00
Martin Liska d0fee87e0c libsanitizer: merge from master
Merged revision: f58e0513dd95944b81ce7a6e7b49ba656de7d75f
2021-05-13 09:29:17 +02:00
Jakub Jelinek d9f462fb37 sanitizer: Fix asan against glibc 2.34 [PR100114]
As mentioned in the PR, SIGSTKSZ is no longer a compile time constant in
glibc 2.34 and later, so
static const uptr kAltStackSize = SIGSTKSZ * 4;
needs dynamic initialization, but is used by a function called indirectly
from .preinit_array and therefore before the variable is constructed.
This results in using 0 size instead and all asan instrumented programs
die with:
==91==ERROR: AddressSanitizer failed to allocate 0x0 (0) bytes of SetAlternateSignalStack (error code: 22)

Here is a cherry-pick from upstream to fix this.

2021-04-17  Jakub Jelinek  <jakub@redhat.com>

	PR sanitizer/100114
	* sanitizer_common/sanitizer_posix_libcdep.cpp: Cherry-pick
	llvm-project revisions 82150606fb11d28813ae6da1101f5bda638165fe
	and b93629dd335ffee2fc4b9b619bf86c3f9e6b0023.
2021-04-17 11:27:14 +02:00
Martin Liska 81fee43851 libsanitizer: cherry-pick ad294e572bc5c16f9dc420cc994322de6ca3fbfb
libsanitizer/ChangeLog:

	PR sanitizer/98920
	* asan/asan_interceptors.cpp (COMMON_INTERCEPT_FUNCTION_VER):
	Cherry pick.
	(COMMON_INTERCEPT_FUNCTION_VER_UNVERSIONED_FALLBACK): Likewise.
	* asan/asan_interceptors.h (ASAN_INTERCEPT_FUNC_VER_UNVERSIONED_FALLBACK): Likewise.
	* sanitizer_common/sanitizer_common_interceptors.inc
	(COMMON_INTERCEPT_FUNCTION_GLIBC_VER_MIN): Likewise.
	(INIT_REGEX): Likewise.
	* tsan/tsan_interceptors_posix.cpp (COMMON_INTERCEPT_FUNCTION_VER_UNVERSIONED_FALLBACK):
	Likewise.

gcc/testsuite/ChangeLog:

	PR sanitizer/98920
	* c-c++-common/asan/pr98920.c: New test.
2021-03-08 15:55:27 +01:00
Matthew Malcomson edb07cb95a libsanitizer: Tie the hwasan library into our build system
This patch tries to tie libhwasan into the GCC build system in the same way
that the other sanitizer runtime libraries are handled.

libsanitizer/ChangeLog:

	* Makefile.am:  Build libhwasan.
	* Makefile.in:  Build libhwasan.
	* asan/Makefile.in:  Build libhwasan.
	* configure:  Build libhwasan.
	* configure.ac:  Build libhwasan.
	* hwasan/Makefile.am: New file.
	* hwasan/Makefile.in: New file.
	* hwasan/libtool-version: New file.
	* interception/Makefile.in: Build libhwasan.
	* libbacktrace/Makefile.in: Build libhwasan.
	* libsanitizer.spec.in: Build libhwasan.
	* lsan/Makefile.in: Build libhwasan.
	* sanitizer_common/Makefile.in: Build libhwasan.
	* tsan/Makefile.in: Build libhwasan.
	* ubsan/Makefile.in: Build libhwasan.
2020-11-25 16:35:33 +00:00
Martin Liska d72227e29a libsanitizer: Apply local patches. 2020-11-13 17:29:28 +01:00
Martin Liska 98f792ff53 libsanitizer: merge from master. 2020-11-13 17:28:49 +01:00
Vitaly Buka 00b355522b Fix compilation on older systems
Cherry-pick upstream commit f97ca48b1cbbf5da065e94271cb3af4f1c907dd4.

Fixes https://bugs.llvm.org/show_bug.cgi?id=47896
2020-10-20 11:15:10 +02:00
Iain Sandoe 476036b35c libsanitizer, Darwin, Bootstrap : Fix bootstrap on Darwin <= 15.
The latest upstream merge for libsanitizer introduces code that makes
use of some macro values that are not available in SDKs for versions
of Darwin <= 15 (macOS 10.11).

Add definitions for these where they are not present.

libsanitizer/ChangeLog:

	* sanitizer_common/sanitizer_mac.h: Ensure that TARGET_OS_
	macros are defined where the macOS SDK does not contain
	them.
	(TARGET_OS_OSX, TARGET_OS_IOS, TARGET_OS_TV, TARGET_OS_WATCH):
	Define where needed.
2020-10-18 20:55:58 +01:00
Martin Liska b040b1ce1f Reapply all revisions mentioned in LOCAL_PATCHES.
(cherry picked from commit 21bb1625bd)
2020-10-16 10:57:16 +02:00
Martin Liska 0b997f6e07 libsanitizer: merge from master 2020-10-16 10:57:03 +02:00
Rainer Orth 6805c1c6a6 libsanitizer: Fix GetPcSpBp determination of SP on 32-bit Solaris/x86
The latest Solaris 11.4/x86 update uncovered a libsanitizer bug that
caused one test to FAIL for 32-bit:

+FAIL: c-c++-common/asan/null-deref-1.c   -O0  output pattern test
+FAIL: c-c++-common/asan/null-deref-1.c   -O1  output pattern test
+FAIL: c-c++-common/asan/null-deref-1.c   -O2  output pattern test
+FAIL: c-c++-common/asan/null-deref-1.c   -O2 -flto  output pattern test
+FAIL: c-c++-common/asan/null-deref-1.c -O2 -flto -flto-partition=none
output pattern test
+FAIL: c-c++-common/asan/null-deref-1.c   -O3 -g  output pattern test
+FAIL: c-c++-common/asan/null-deref-1.c   -Os  output pattern test

I've identified the problem and the fix has just landed in upstream
llvm-project:

	https://reviews.llvm.org/D83664

Tested on i386-pc-solaris2.11 and x86_64-pc-linux.gnu.

	libsanitizer:
	* sanitizer_common/sanitizer_linux.cpp: Cherry-pick llvm-project
	revision f0e9b76c3500496f8f3ea7abe6f4bf801e3b41e7.
2020-07-16 10:38:48 +02:00
Martin Liska 942a384ef9
libsanitizer: use gnu++14
libsanitizer/ChangeLog:

	* asan/Makefile.am: Replace gnu++11 with gnu++14.
	* interception/Makefile.am: Likewise.
	* libbacktrace/Makefile.am: Likewise.
	* lsan/Makefile.am: Likewise.
	* sanitizer_common/Makefile.am: Likewise.
	* tsan/Makefile.am: Likewise.
	* ubsan/Makefile.am: Likewise.
	* asan/Makefile.in: Regenerate.
	* interception/Makefile.in: Likewise.
	* libbacktrace/Makefile.in: Likewise.
	* lsan/Makefile.in: Likewise.
	* sanitizer_common/Makefile.in: Likewise.
	* tsan/Makefile.in: Likewise.
	* ubsan/Makefile.in: Likewise.
2020-06-09 10:07:24 +02:00
Martin Liska f18ab18032
Reapply all revisions mentioned in LOCAL_PATCHES.
(cherry picked from commit 21bb1625bd)
2020-06-02 08:02:15 +02:00
Martin Liska 3c6331c29f
Libsanitizer: merge from master.
Merged from revision b638b63b99d66786cb37336292604a2ae3490cfd.

The patch successfully bootstraps on x86_64-linux-gnu and
ppc64le-linux-gnu. I also tested ppc64-linux-gnu that exposed:
https://reviews.llvm.org/D80864 (which is fixed on master).

Abidiff looks happy and I made UBSAN and ASAN bootstrap on
x86_64-linux-gnu.

I'm planning to do merge from master twice a year, once now and
next time short before stage1 closes.

I am going to install the patches as merge from master is obvious
and I haven't made anything special.

libsanitizer/ChangeLog:

	* MERGE: Merge from master.
2020-06-02 08:02:07 +02:00
Andreas Tobler bf1dde9790 libsanitizer: Add missing file and regen Makefile.in
In the last import the sanitizer_platform_limits_freebsd.cpp got
forgotten. Fix this.

libsanitizer/sanitizer_common:

	* Makefile.am: Add sanitizer_platform_limits_freebsd.cpp.
	* Makefile.in: Regenerate.
2020-05-01 16:24:37 +02:00
Maciej W. Rozycki e8e66971cd Add `--with-toolexeclibdir=' configuration option
Provide means, in the form of a `--with-toolexeclibdir=' configuration
option, to override the default installation directory for target
libraries, otherwise known as $toolexeclibdir.  This is so that it is
possible to get newly-built libraries, particularly the shared ones,
installed in a common place, so that they can be readily used by the
target system as their host libraries, possibly over NFS, without a need
to manually copy them over from the currently hardcoded location they
would otherwise be installed in.

In the presence of the `--enable-version-specific-runtime-libs' option
and for configurations building native GCC the option is ignored.

	config/
	* toolexeclibdir.m4: New file.

	gcc/
	* doc/install.texi (Cross-Compiler-Specific Options): Document
	`--with-toolexeclibdir' option.

	libada/
	* Makefile.in (configure_deps): Add `toolexeclibdir.m4'.
	* configure.ac: Handle `--with-toolexeclibdir='.
	* configure: Regenerate.

	libatomic/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/Makefile.in: Regenerate.

	libffi/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* include/Makefile.in: Regenerate.
	* man/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

	libgcc/
	* Makefile.in (configure_deps): Add `toolexeclibdir.m4'.
	* configure.ac: Handle `--with-toolexeclibdir='.
	* configure: Regenerate.

	libgfortran/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	libgomp/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/Makefile.in: Regenerate.

	libhsail-rt/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	libitm/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/Makefile.in: Regenerate.

	libobjc/
	* Makefile.in (aclocal_deps): Add `toolexeclibdir.m4'.
	* aclocal.m4: Include `toolexeclibdir.m4'.
	* configure.ac: Handle `--with-toolexeclibdir='.
	* configure: Regenerate.

	liboffloadmic/
	* plugin/configure.ac: Handle `--with-toolexeclibdir='.
	* plugin/Makefile.in: Regenerate.
	* plugin/aclocal.m4: Regenerate.
	* plugin/configure: Regenerate.
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	libphobos/
	* m4/druntime.m4: Handle `--with-toolexeclibdir='.
	* m4/Makefile.in: Regenerate.
	* libdruntime/Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	libquadmath/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	libsanitizer/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* asan/Makefile.in: Regenerate.
	* interception/Makefile.in: Regenerate.
	* libbacktrace/Makefile.in: Regenerate.
	* lsan/Makefile.in: Regenerate.
	* sanitizer_common/Makefile.in: Regenerate.
	* tsan/Makefile.in: Regenerate.
	* ubsan/Makefile.in: Regenerate.

	libssp/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	libstdc++-v3/
	* acinclude.m4: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* libsupc++/Makefile.in: Regenerate.
	* po/Makefile.in: Regenerate.
	* python/Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
	* src/c++11/Makefile.in: Regenerate.
	* src/c++17/Makefile.in: Regenerate.
	* src/c++98/Makefile.in: Regenerate.
	* src/filesystem/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

	libvtv/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/Makefile.in: Regenerate.

	zlib/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
2020-01-24 11:24:25 +00:00
Jakub Jelinek 4abc46b51a re PR sanitizer/92154 (new glibc breaks arm bootstrap due to libsanitizer)
PR sanitizer/92154
	* sanitizer_common/sanitizer_platform_limits_posix.h: Cherry-pick
	llvm-project revision 947f9692440836dcb8d88b74b69dd379d85974ce.
	* sanitizer_common/sanitizer_platform_limits_posix.cpp: Likewise.

From-SVN: r278722
2019-11-26 10:08:31 +01:00
Martin Liska 21bb1625bd Reapply all revisions mentioned in LOCAL_PATCHES.
2019-11-07  Martin Liska  <mliska@suse.cz>

	* all source files: Reapply all revisions mentioned in LOCAL_PATCHES.

From-SVN: r277910
2019-11-07 09:34:14 +00:00
Martin Liska cb7dc4da4c Libsanitizer: merge from trunk
2019-11-07  Martin Liska  <mliska@suse.cz>

	* merge.sh: Update to use llvm-project git repository.
	* all source files: Merge from upstream
	82588e05cc32bb30807e480abd4e689b0dee132a.

From-SVN: r277909
2019-11-07 09:33:54 +00:00
Martin Liska acd700fdc7 Reapply all revisions mentioned in LOCAL_PATCHES.
2019-11-05  Martin Liska  <mliska@suse.cz>

	* asan/asan_globals.cpp (CheckODRViolationViaIndicator): Reapply from
	LOCAL_PATCHES.
	(CheckODRViolationViaPoisoning): Likewise.
	(RegisterGlobal): Likewise.
	* asan/asan_interceptors.h (ASAN_INTERCEPT___CXA_RETHROW_PRIMARY_EXCEPTION): Likewise.
	(defined): Likewise.
	* asan/asan_mapping.h: Likewise.
	* sanitizer_common/sanitizer_linux_libcdep.cpp (defined): Likewise.
	* sanitizer_common/sanitizer_mac.cpp (defined): Likewise.
	* sanitizer_common/sanitizer_platform_limits_linux.cpp (defined): Likewise.
	* sanitizer_common/sanitizer_platform_limits_posix.h: Likewise.
	* sanitizer_common/sanitizer_stacktrace.cpp (GetCanonicFrame): Likewise.
	* tsan/tsan_rtl_ppc64.S: Likewise.
	* ubsan/ubsan_handlers.cpp (__ubsan::__ubsan_handle_cfi_bad_icall): Likewise.
	(__ubsan::__ubsan_handle_cfi_bad_icall_abort): Likewise.
	* ubsan/ubsan_handlers.h (struct CFIBadIcallData): Likewise.
	(struct CFICheckFailData): Likewise.
	(RECOVERABLE): Likewise.
	* ubsan/ubsan_platform.h: Likewise.

From-SVN: r277836
2019-11-05 13:55:27 +00:00
Martin Liska 3ca75cd550 Libsanitizer: merge from trunk with merge.sh.
2019-11-05  Martin Liska  <mliska@suse.cz>

	* all source files: Merge from upstream r375507.

From-SVN: r277834
2019-11-05 13:54:57 +00:00
Tamar Christina 761a3a95ee Arm: Fix arm libsanitizer bootstrap failure
Glibc has recently introduced changed to the mode field in ipc_perm
in commit 2f959dfe849e0646e27403f2e4091536496ac0f0. For Arm this
means that the mode field no longer has the same size.

This causes an assert failure against libsanitizer's internal copy
of ipc_perm.  Since this change can't be easily detected I am adding
arm to the list of targets that are excluded from this check.  libsanitizer
doesn't use this field (and others, it in fact uses only 1 field) so this check
can be ignored.

Padding bits were used by glibc when the field was changed so sizeof and offsets
of the remaining fields should be the same.

libsanitizer/ChangeLog:

	PR sanitizer/92154
	* sanitizer_common/sanitizer_platform_limits_posix.cpp (defined):
	Cherry-pick compiler-rt revision r375220.

From-SVN: r277291
2019-10-22 14:25:38 +00:00
Iain Sandoe 8bc1fac71d [libsanitizer] Fix PR bootstrap/91455
If a target does not support libbacktrace, it might still the include
for $(top_srcdir).

Regenerate the built files using automake-1.15.1

libsanitizer/

2019-08-15  Iain Sandoe  <iain@sandoe.co.uk>

	PR bootstrap/91455
	* Makefile.in: Regenerated.
	* aclocal.m4: Likewise.
	* asan/Makefile.in: Likewise.
	* configure: Likewise.
	* interception/Makefile.in: Likewise.
	* libbacktrace/Makefile.in: Likewise.
	* lsan/Makefile.in: Likewise.
	* sanitizer_common/Makefile.am: Include top_srcdir unconditionally.
	* sanitizer_common/Makefile.in: Regenerated.
	* tsan/Makefile.in: Likewise.
	* ubsan/Makefile.in: Likewise.

From-SVN: r274538
2019-08-15 14:13:10 +00:00
Martin Liska 47f0255fbb Reapply all revisions mentioned in LOCAL_PATCHES.
2019-08-14  Martin Liska  <mliska@suse.cz>

	* asan/asan_globals.cpp (CheckODRViolationViaIndicator): Reapply
	patch from trunk.
	(CheckODRViolationViaPoisoning): Likewise.
	(RegisterGlobal): Likewise.
	* asan/asan_mapping.h: Likewise.
	* sanitizer_common/sanitizer_linux_libcdep.cpp (defined): Likewise.
	* sanitizer_common/sanitizer_mac.cpp (defined): Likewise.
	* sanitizer_common/sanitizer_platform_limits_linux.cpp (defined): Likewise.
	* sanitizer_common/sanitizer_platform_limits_posix.h (defined): Likewise.
	* sanitizer_common/sanitizer_stacktrace.cpp (GetCanonicFrame): Likewise.
	* ubsan/ubsan_handlers.cpp (__ubsan::__ubsan_handle_cfi_bad_icall): Likewise.
	(__ubsan::__ubsan_handle_cfi_bad_icall_abort): Likewise.
	* ubsan/ubsan_handlers.h (struct CFIBadIcallData): Likewise.
	(struct CFICheckFailData): Likewise.
	(RECOVERABLE): Likewise.
	* ubsan/ubsan_platform.h: Likewise.

From-SVN: r274427
2019-08-14 08:47:36 +00:00
Martin Liska b667dd7017 Libsanitizer merge from trunk r368656.
2019-08-14  Martin Liska  <mliska@suse.cz>

	PR sanitizer/89832
	PR sanitizer/91325
	* All source files: Merge from upstream 368656.

From-SVN: r274426
2019-08-14 08:47:11 +00:00
Rainer Orth 7cfb726052 Fix sanitizer_common/sanitizer_posix_libcdep.cc compilation on Solaris 11.5
* sanitizer_common/sanitizer_posix_libcdep.cc: Cherry-pick
	compiler-rt revision 363778.

From-SVN: r272685
2019-06-26 10:43:08 +00:00
Martin Liska 17cf909024 Add missing libsanitizer extra patch (r259664) (PR sanitizer/89941).
2019-04-08  Martin Liska  <mliska@suse.cz>

	PR sanitizer/89941
	* sanitizer_common/sanitizer_platform_limits_linux.cc (defined):
	Reapply patch from r259664.
	* sanitizer_common/sanitizer_platform_limits_posix.h (defined):
	Likewise.

From-SVN: r270208
2019-04-08 13:08:30 +00:00
Eric Botcazou 36b50aeb4e re PR sanitizer/80953 (Support libsanitizer on Solaris)
PR sanitizer/80953
	Merge from LLVM revision 355978
	* sanitizer_common/sanitizer_allocator_primary32.h
	(class SizeClassAllocator32): Assert that kSpaceSize is power of 2 if
	SANITIZER_SIGN_EXTENDED_ADDRESSES is set.
	(PointerIsMine): Deal with SANITIZER_SIGN_EXTENDED_ADDRESSES.
	(ComputeRegionId): Likewise.
	* sanitizer_common/sanitizer_linux.cc (GetMaxVirtualAddress): Return
	appropriate value for SPARC 64-bit.
	* sanitizer_common/sanitizer_platform.h (SANITIZER_MMAP_RANGE_SIZE):
	Define for SPARC.
	(SANITIZER_SIGN_EXTENDED_ADDRESSES): Define to 1 for SPARC 64-bit.

From-SVN: r269639
2019-03-13 09:11:46 +00:00
Eric Botcazou 017abbe362 re PR sanitizer/80953 (Support libsanitizer on Solaris)
PR sanitizer/80953
	Merge from LLVM revision 355965
	* sanitizer_common/sanitizer_linux.cc (GetWriteFlag): Implement for
	SPARC/Linux.
	(GetPcSpBp): Likewise.
	* sanitizer_common/sanitizer_stacktrace.cc (GetNextInstructionPc):
	Adjust for SPARC.
	* sanitizer_common/sanitizer_stacktrace.h (SANITIZER_CAN_FAST_UNWIND):
	Define to 1 for SPARC.
	* sanitizer_common/sanitizer_stacktrace_sparc.cc: Rewrite.
	* sanitizer_common/sanitizer_unwind_linux_libcdep.cc (SlowUnwindStack):
	Adjust the PC address for SPARC with GCC.

From-SVN: r269638
2019-03-13 09:05:43 +00:00
Martin Liska c24847a54a Charry pick libsanitizer r355488 (PR sanitizer/88684).
2019-03-06  Martin Liska  <mliska@suse.cz>

	PR sanitizer/88684
	* sanitizer_common/sanitizer_platform.h (defined): Cherry pick.
	(SANITIZER_NON_UNIQUE_TYPEINFO): Likewise.
	* ubsan/ubsan_type_hash_itanium.cc (isDerivedFromAtOffset):
	Likewise.

From-SVN: r269419
2019-03-06 11:46:15 +00:00