aboutsummaryrefslogtreecommitdiff
path: root/libsanitizer
AgeCommit message (Collapse)AuthorFilesLines
2022-05-06Daily bump.GCC Administrator1-0/+4
2022-05-05libsanitizer: cherry-pick commit b226894d475b from upstreamH.J. Lu1-0/+4
cherry-pick: b226894d475b [sanitizer] [sanitizer] Correct GetTls for x32
2022-05-05libsanitizer: update LOCAL_PATCHES.Martin Liska1-2/+1
libsanitizer/ChangeLog: * LOCAL_PATCHES: Update.
2022-05-05libsanitizer: Apply local patchesMartin Liska14-30/+85
2022-05-05libsanitizer: merge from master (75f9e83ace52773af65dcebca543005ec8a2705d).Martin Liska18-93/+45
2022-05-05Daily bump.GCC Administrator1-0/+15
2022-05-04libsanitizer: cherry-pick commit f52e365092aa from upstreamH.J. Lu1-2/+2
cherry-pick: f52e365092aa [sanitizer] Use newfstatat for x32
2022-05-04libsanitizer: Update Makefile.am files.Martin Liska12-25/+20
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-04libsanitizer: Apply local patchesH.J. Lu14-30/+85
2022-05-04libsanitizer: merge from upstream (0a1bcab9f3bf75c4c5d3e53bafb3eeb80320af46).Martin Liska182-5387/+6955
2022-03-15Daily bump.GCC Administrator1-0/+9
2022-03-15Enable libsanitizer build on mips64Xi Ruoyao1-4/+0
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-15libsanitizer: cherry-pick db7bca28638e from upstreamXi Ruoyao1-2/+2
libsanitizer/ * sanitizer_common/sanitizer_atomic_clang.h: Ensures to only include sanitizer_atomic_clang_mips.h for O32.
2022-02-16Daily bump.GCC Administrator1-0/+5
2022-02-15sanitizer: Use glibc _thread_db_sizeof_pthread symbol if presentJakub Jelinek1-5/+16
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-04Daily bump.GCC Administrator1-0/+17
2022-02-03make `-Werror` optional in libatomic/libbacktrace/libgomp/libitm/libsanitizerDavid Seifert13-7/+103
* `-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>
2021-12-07Daily bump.GCC Administrator1-0/+11
2021-12-06libsanitizer: Update LOCAL_PATCHESH.J. Lu1-0/+1
Add commit 70b043845d7c378c6a9361a6769885897d1018c2 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 70b043845d7.
2021-12-06libsanitizer: Use SSE to save and restore XMM registersH.J. Lu1-64/+64
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-11-29Daily bump.GCC Administrator1-0/+14
2021-11-28Fix PR 62157: disclean in libsanitizer not workingAndrew Pinski10-2/+13
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-19Daily bump.GCC Administrator1-0/+7
2021-11-18libsanitizer: Fix bootstrap on FreeBSD [PR102675]Jakub Jelinek2-0/+2
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-14Daily bump.GCC Administrator1-0/+4
2021-11-13libsanitizer: Update LOCAL_PATCHESH.J. Lu1-1/+1
* LOCAL_PATCHES: Update to the corresponding revision.
2021-11-13libsanitizer: Apply local patchesH.J. Lu14-30/+85
2021-11-13libsanitizer: Merge with upstreamH.J. Lu43-333/+469
Merged revision: 82bc6a094e85014f1891ef9407496f44af8fe442 with the fix for PR sanitizer/102911
2021-11-05libsanitizer: update LOCAL_PATCHES.Martin Liska1-1/+1
2021-11-05libsanitizer: Apply local patchesH.J. Lu14-30/+85
2021-11-05libsanitizer: merge from master (78d3e0a4f1406b17cdecc77540e09210670fe9a9).Martin Liska21-101/+48
2021-11-05Daily bump.GCC Administrator1-0/+4
2021-11-04libsanitizer: update LOCAL_PATCHESMartin Liska1-1/+1
libsanitizer/ChangeLog: * LOCAL_PATCHES: Update git revision.
2021-11-04libsanitizer: Apply local patchesH.J. Lu14-30/+85
2021-11-04lisanitizer: Apply autoreconf.Martin Liska5-21/+10
2021-11-04libsanitizer: merge from master (c86b4503a94c277534ce4b9a5c015a6ac151b98a).Martin Liska63-1300/+1457
2021-10-09Daily bump.GCC Administrator1-0/+16
2021-10-08libsanitizer: Add AM_CCASFLAGS to Makefile.amH.J. Lu12-0/+12
commit 9069eb28d45baaa8baf5e3790b03b0e2cc5b49b3 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-07Daily bump.GCC Administrator1-0/+4
2021-10-06libsanitizer: Update LOCAL_PATCHESH.J. Lu1-1/+1
* LOCAL_PATCHES: Update to the corresponding revision.
2021-10-06libsanitizer: Apply local patchesH.J. Lu14-30/+85
2021-10-06libsanitizer: Merge with upstreamH.J. Lu44-257/+257
Merged revision: fdf4c035225de52f596899931b1f6100e5e3e928
2021-10-02Daily bump.GCC Administrator1-0/+4
2021-10-01libsanitizer: Update LOCAL_PATCHESH.J. Lu1-1/+1
* LOCAL_PATCHES: Update to the corresponding revision.
2021-10-01libsanitizer: Bump asan/tsan versionsH.J. Lu2-2/+2
Bump asan/tsan versions for upstream commits: commit f1bb30a4956f83e46406d6082e5d376ce65391e0 Author: Vitaly Buka <vitalybuka@google.com> Date: Thu Aug 26 10:25:09 2021 -0700 [sanitizer] No THREADLOCAL in qsort and bsearch qsort can reuse qsort_r if available. bsearch always passes key as the first comparator argument, so we can use it to wrap the original comparator. Differential Revision: https://reviews.llvm.org/D108751 commit d77b476c1953bcb0a608b2d6a4f2dd9fe0b43967 Author: Dmitry Vyukov <dvyukov@google.com> Date: Mon Aug 2 16:52:53 2021 +0200 tsan: avoid extra call indirection in unaligned access functions Currently unaligned access functions are defined in tsan_interface.cpp and do a real call to MemoryAccess. This means we have a real call and no read/write constant propagation. Unaligned memory access can be quite hot for some programs (observed on some compression algorithms with ~90% of unaligned accesses). Move them to tsan_interface_inl.h to avoid the additional call and enable constant propagation. Also reorder the actual store and memory access handling for __sanitizer_unaligned_store callbacks to enable tail calling in MemoryAccess. Depends on D107282. Reviewed By: vitalybuka, melver commit 97795be22f634667ce7a022398c59ccc9f7440eb Author: Dmitry Vyukov <dvyukov@google.com> Date: Fri Jul 30 08:35:11 2021 +0200 tsan: optimize test-only barrier The updated lots_of_threads.c test with 300 threads started running for too long on machines with low hardware parallelism (e.g. taskset -c 0-1). On lots of CPUs it finishes in ~2 secs. But with taskset -c 0-1 it runs for hundreds of seconds effectively spinning in the barrier in the sleep loop. We now have the handy futex API in sanitizer_common. Use it instead of the passive spin loop. It makes the test run only faster with taskset -c 0-1, it runs for ~1.5 secs, while with full parallelism it still runs for ~2 secs (but consumes less CPU time). Depends on D107131. Reviewed By: vitalybuka
2021-10-01libsanitizer: Apply local patchesH.J. Lu14-30/+85
2021-10-01libsanitizer: Merge with upstreamH.J. Lu155-6109/+7454
Merged revision: 1c2e5fd66ea27d0c51360ba4e22099124a915562
2021-08-12Daily bump.GCC Administrator1-0/+5
2021-08-11sanitizer: Cherry-pick realpath fixJakub Jelinek1-11/+1
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-04Daily bump.GCC Administrator1-0/+5