Commit Graph

382 Commits

Author SHA1 Message Date
Dimitrije Milošević
1efeaf99bd libsanitizer: Cherry-pick 2bfb0fcb51510f22723c8cdfefe from upstream
2bfb0fcb51510f22723c8cdfefe [Sanitizer][MIPS] Fix stat struct size for the O32 ABI.

Signed-off-by: Dimitrije Milosevic <dimitrije.milosevic@syrmia.com>.
2022-08-01 06:10:31 +02:00
GCC Administrator
b563a8dd3f Daily bump. 2022-07-23 00:16:27 +00:00
Rainer Orth
786e51648b libsanitizer: Fix Solaris 11.3 compilation [PR105531]
The libsanitizer build has been broken on Solaris 11.3 by the latest
import.  An upstream patch to fix this has now been committed:

	[sanitizer_common] Support Solaris < 11.4 in GetStaticTlsBoundary
        https://reviews.llvm.org/D120059

I'd like to cherry-pick it into libsanitizer, too.

Bootstrapped without regressions on sparc-sun-solaris2.11,
i386-pc-solaris2.11 (both Solaris 11.3 and 11.4), and
x86_64-pc-linux-gnu.

2022-07-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	libsanitizer:
	PR sanitizer/105531
	* sanitizer_common/sanitizer_linux_libcdep.cpp,
	sanitizer_common/sanitizer_solaris.h:: Cherry-pick
	llvm-project revision 3776db9a4fd2080d23d6a5f52e405eea44558761.
2022-07-22 13:18:14 +02:00
Martin Liska
2701442d0c libsanitizer: cherry-pick 9cf13067cb5088626ba7 from upstream
9cf13067cb5088626ba7ee1ec4c42ec59c7995a0 [sanitizer] Remove #include <linux/fs.h> to resolve fsconfig_command/mount_attr conflict with glibc 2.36
2022-07-11 22:04:00 +02:00
Dimitrije Milosevic
ee915c72da
libsanitizer: Cherry-pick 5d8077565e41 from upstream
5d8077565e41: [MIPS][AddressSanitizer] Resolve build issues for the n32 ABI
2022-07-07 10:19:58 +08:00
Martin Liska
aa87b7541b libsanitizer: cherry-pick 791e0d1bc85d
791e0d1bc85d: [compiler-rt] Add NO_EXEC_STACK_DIRECTIVE on s390x
2022-06-29 15:28:07 +02:00
GCC Administrator
ab869e7f75 Daily bump. 2022-05-06 00:16:26 +00:00
H.J. Lu
a48be2e513 libsanitizer: cherry-pick commit b226894d475b from upstream
cherry-pick:

b226894d475b [sanitizer] [sanitizer] Correct GetTls for x32
2022-05-05 13:59:16 -07:00
Martin Liska
7ec6fed1e8 libsanitizer: update LOCAL_PATCHES.
libsanitizer/ChangeLog:

	* LOCAL_PATCHES: Update.
2022-05-05 13:25:16 +02:00
Martin Liska
45e69f7f38 libsanitizer: Apply local patches 2022-05-05 13:24:20 +02:00
Martin Liska
8996894d00 libsanitizer: merge from master (75f9e83ace52773af65dcebca543005ec8a2705d). 2022-05-05 13:24:04 +02:00
GCC Administrator
3e7db51747 Daily bump. 2022-05-05 00:16:29 +00:00
H.J. Lu
ae90c2d0f9 libsanitizer: cherry-pick commit f52e365092aa from upstream
cherry-pick:

f52e365092aa [sanitizer] Use newfstatat for x32
2022-05-04 15:59:49 -07:00
Martin Liska
056d8a82fc libsanitizer: Update Makefile.am files.
libsanitizer/ChangeLog:

	* tsan/Makefile.am: Update Makefile.am files.
	* hwasan/Makefile.am: Likewise.
	* sanitizer_common/Makefile.am: Likewise.
	* Makefile.in: Re-generate.
	* 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.
2022-05-04 11:00:53 +02:00
H.J. Lu
22a2a09186 libsanitizer: Apply local patches 2022-05-04 11:00:52 +02:00
Martin Liska
f732bf6a60 libsanitizer: merge from upstream (0a1bcab9f3bf75c4c5d3e53bafb3eeb80320af46). 2022-05-04 11:00:48 +02:00
GCC Administrator
510613e76c Daily bump. 2022-03-15 00:16:49 +00:00
Xi Ruoyao
344e6f9f2a
Enable libsanitizer build on mips64
Bootstrapped and regtested on mips64-linux-gnuabi64.

bootstrap-ubsan revealed 3 bugs (PR 104842, 104843, 104851).
bootstrap-asan did not reveal any new bug.

gcc/

	* config/mips/mips.h (SUBTARGET_SHADOW_OFFSET): Define.
	* config/mips/mips.cc (mips_option_override): Make
	-fsanitize=address imply -fasynchronous-unwind-tables.  This is
	needed by libasan for stack backtrace on MIPS.
	(mips_asan_shadow_offset): Return SUBTARGET_SHADOW_OFFSET.

gcc/testsuite:

	* c-c++-common/asan/global-overflow-1.c: Skip for MIPS with some
	optimization levels because inaccurate debug info is causing
	dg-output mismatch on line numbers.
	* g++.dg/asan/large-func-test-1.C: Likewise.

libsanitizer/

	* configure.tgt: Enable build on mips*64*-*-linux*.
2022-03-15 00:39:47 +08:00
Xi Ruoyao
a60a3a95d0
libsanitizer: cherry-pick db7bca28638e from upstream
libsanitizer/

	* sanitizer_common/sanitizer_atomic_clang.h: Ensures to only
	include sanitizer_atomic_clang_mips.h for O32.
2022-03-15 00:34:12 +08:00
GCC Administrator
875e493bf5 Daily bump. 2022-02-16 00:16:26 +00:00
Jakub Jelinek
c4c0aa6089 sanitizer: Use glibc _thread_db_sizeof_pthread symbol if present
I've cherry-picked following fix from llvm-project.  Recent glibcs
have _thread_db_sizeof_pthread symbol variable which contains the
size of struct pthread, so that sanitizers don't need to guess that
and risk that it will change again.

2022-02-15  Jakub Jelinek  <jakub@redhat.com>

	* sanitizer_common/sanitizer_linux_libcdep.cpp: Cherry-pick
	llvm-project revision ef14b78d9a144ba81ba02083fe21eb286a88732b.
2022-02-15 11:18:56 +01:00
GCC Administrator
682ede3959 Daily bump. 2022-02-04 00:16:24 +00:00
David Seifert
45ba6bf28b make -Werror optional in libatomic/libbacktrace/libgomp/libitm/libsanitizer
* `-Werror` can cause issues when a more recent version of GCC compiles
  an older version:
  - https://bugs.gentoo.org/229059
  - https://bugs.gentoo.org/475350
  - https://bugs.gentoo.org/667104

libatomic/ChangeLog:

	* configure.ac: Support --disable-werror.
	* configure: Regenerate.

libbacktrace/ChangeLog:

	* configure.ac: Support --disable-werror.
	* configure: Regenerate.

libgomp/ChangeLog:

	* configure.ac: Support --disable-werror.
	* configure: Regenerate.

libitm/ChangeLog:

	* configure.ac: Support --disable-werror.
	* configure: Regenerate.

libsanitizer/ChangeLog:

	* configure.ac: Support --disable-werror.
	* aclocal.m4: Include also ../config/warnings.m4.
	* libbacktrace/Makefile.am (WARN_FLAGS): Remove.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* asan/Makefile.in: Regenerate.
	* hwasan/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.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
2022-02-03 16:10:18 +01:00
GCC Administrator
3a580f967e Daily bump. 2021-12-07 00:16:23 +00:00
H.J. Lu
2a20407bac libsanitizer: Update LOCAL_PATCHES
Add

commit 70b043845d
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Nov 30 05:31:26 2021 -0800

    libsanitizer: Use SSE to save and restore XMM registers

to LOCAL_PATCHES.

	* LOCAL_PATCHES: Add commit 70b043845d.
2021-12-06 08:17:49 -08:00
H.J. Lu
70b043845d libsanitizer: Use SSE to save and restore XMM registers
Use SSE, instead of AVX, to save and restore XMM registers to support
processors without AVX.  The affected codes are unused in upstream since

https://github.com/llvm/llvm-project/commit/66d4ce7e26a5

and will be removed in

https://reviews.llvm.org/D112604

This fixed

FAIL: g++.dg/tsan/pthread_cond_clockwait.C   -O0  execution test
FAIL: g++.dg/tsan/pthread_cond_clockwait.C   -O2  execution test

on machines without AVX.

	PR sanitizer/103466
	* tsan/tsan_rtl_amd64.S (__tsan_trace_switch_thunk): Replace
	vmovdqu with movdqu.
	(__tsan_report_race_thunk): Likewise.
2021-12-06 08:16:49 -08:00
GCC Administrator
2f0dd172bc Daily bump. 2021-11-29 00:16:16 +00:00
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
GCC Administrator
483092d3d9 Daily bump. 2021-11-19 00:16:34 +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
GCC Administrator
a8029add30 Daily bump. 2021-11-14 00:16:23 +00:00
H.J. Lu
380fc3b69f libsanitizer: Update LOCAL_PATCHES
* LOCAL_PATCHES: Update to the corresponding revision.
2021-11-13 05:17:14 -08: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
Martin Liska
bdb9d47218 libsanitizer: update LOCAL_PATCHES. 2021-11-05 18:21:42 +01: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
GCC Administrator
29a1af24ef Daily bump. 2021-11-05 00:16:36 +00:00
Martin Liska
af976d90fa libsanitizer: update LOCAL_PATCHES
libsanitizer/ChangeLog:

	* LOCAL_PATCHES: Update git revision.
2021-11-04 13:26:58 +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
GCC Administrator
ce6eec3926 Daily bump. 2021-10-09 00:16:26 +00:00
H.J. Lu
a23653c6a6 libsanitizer: Add AM_CCASFLAGS to Makefile.am
commit 9069eb28d4
Author: Igor Tsimbalist <igor.v.tsimbalist@intel.com>
Date:   Fri Nov 17 22:34:50 2017 +0100

    Enable building libsanitizer with Intel CET

    libsanitizer/
            * acinclude.m4: Add enable.m4 and cet.m4.
            * Makefile.in: Regenerate.
            * asan/Makefile.am: Update AM_CXXFLAGS.
            * asan/Makefile.in: Regenerate.
            * configure: Likewise.
            * configure.ac: Set CET_FLAGS. Update EXTRA_CFLAGS,
            EXTRA_CXXFLAGS, EXTRA_ASFLAGS.
            * interception/Makefile.am: Update AM_CXXFLAGS.
            * interception/Makefile.in: Regenerate.
            * libbacktrace/Makefile.am: Update AM_CFLAGS, AM_CXXFLAGS.
            * libbacktrace/Makefile.in: Regenerate.
            * lsan/Makefile.am: Update AM_CXXFLAGS.
            * lsan/Makefile.in: Regenerate.
            * sanitizer_common/Makefile.am: Update AM_CXXFLAGS,
            AM_CCASFLAGS.
            * sanitizer_common/sanitizer_linux_x86_64.S: Include cet.h.
            Add _CET_ENDBR macro.
            * sanitizer_common/Makefile.in: Regenerate.
            * tsan/Makefile.am: Update AM_CXXFLAGS.
            * tsan/Makefile.in: Regenerate.
            * tsan/tsan_rtl_amd64.S Include cet.h. Add _CET_ENDBR macro.
            * ubsan/Makefile.am: Update AM_CXXFLAGS.
            * ubsan/Makefile.in: Regenerate.

failed to add EXTRA_ASFLAGS to AM_CCASFLAGS in all Makefile.am.  As
the result, CET aren't enabled in all assembly codes.

Add AM_CCASFLAGS to Makefile.am to compile assembly codes with $CET_FLAGS.

	PR sanitizer/102632
	* asan/Makefile.am (AM_CCASFLAGS): New.  Set to $(EXTRA_ASFLAGS).
	* hwasan/Makefile.am (AM_CCASFLAGS): Likewise.
	* interception/Makefile.am (AM_CCASFLAGS): Likewise.
	* lsan/Makefile.am (AM_CCASFLAGS): Likewise.
	* tsan/Makefile.am (AM_CCASFLAGS): Likewise.
	* ubsan/Makefile.am (AM_CCASFLAGS): Likewise.
	* asan/Makefile.in: Regenerate.
	* hwasan/Makefile.in: Likewise.
	* interception/Makefile.in: Likewise.
	* lsan/Makefile.in: Likewise.
	* tsan/Makefile.in: Likewise.
	* ubsan/Makefile.in: Likewise.
2021-10-08 06:17:01 -07:00
GCC Administrator
57c7ec62ee Daily bump. 2021-10-07 00:16:24 +00:00
H.J. Lu
929cb75e42 libsanitizer: Update LOCAL_PATCHES
* LOCAL_PATCHES: Update to the corresponding revision.
2021-10-06 13:11:34 -07: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
GCC Administrator
9d116bcc55 Daily bump. 2021-10-02 00:16:31 +00:00
H.J. Lu
be5bdccd86 libsanitizer: Update LOCAL_PATCHES
* LOCAL_PATCHES: Update to the corresponding revision.
2021-10-01 09:04:28 -07:00