aboutsummaryrefslogtreecommitdiff
path: root/libsanitizer
AgeCommit message (Collapse)AuthorFilesLines
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
2021-08-03Fix bashism in `libsanitizer/configure.tgt'Mosè Giordano1-1/+1
Appending to a string variable with `+=' is a bashism and does not work in strict POSIX shells like dash. This results in the extra compilation flags not to be set correctly. This patch replaces the `+=' syntax with a simple string interpolation to append to the `EXTRA_CXXFLAGS' variable. libsanitizer/ChangeLog PR sanitizer/101111 * configure.tgt: Fix bashism in setting of `EXTRA_CXXFLAGS'.
2021-07-29Daily bump.GCC Administrator1-0/+5
2021-07-28IBM Z: Enable LSan and TSanIlya Leoshkevich1-0/+5
libsanitizer/ChangeLog: * configure.tgt (s390*-*-linux*): Enable LSan and TSan for s390x.
2021-07-21Daily bump.GCC Administrator1-0/+9
2021-07-20libsanitizer: Bump asan/tsan versionsH.J. Lu2-2/+2
Bump asan/tsan versions for the upstream commit: commit acf0a6428681dccac803984bfbb1e3e54248f090 Author: Ilya Leoshkevich <iii@linux.ibm.com> Date: Fri Jul 2 02:42:38 2021 +0200 [sanitizer] Fix __sanitizer_kernel_sigset_t endianness issue setuid(0) hangs on SystemZ under TSan because TSan's BackgroundThread ignores SIGSETXID. This in turn happens because internal_sigdelset() messes up the mask bits on big-endian system due to how __sanitizer_kernel_sigset_t is defined. Commit d9a1a53b8d80 ("[ESan] [MIPS] Fix workingset-signal-posix.cpp on MIPS") fixed this for MIPS by adjusting the __sanitizer_kernel_sigset_t definition. Generalize this by defining __SANITIZER_KERNEL_NSIG based on kernel's _NSIG and using uptr[] for __sanitizer_kernel_sigset_t.sig on all platforms. Reviewed By: dvyukov Differential Revision: https://reviews.llvm.org/D105629 which changed __sanitizer_kernel_sigset_t and changed the ABI for function void __sanitizer_syscall_post_impl_rt_sigaction (long int, long int, const __sanitizer::__sanitizer_kernel_sigaction_t*, __sanitizer::__sanitizer_kernel_sigaction_t*, SIZE_T); * asan/libtool-version: Bump version. * tsan/libtool-version: Likewise.
2021-07-20libsanitizer: Update LOCAL_PATCHESH.J. Lu1-2/+1
* LOCAL_PATCHES: Update to the corresponding revision.
2021-07-20libsanitizer: Apply local patchesH.J. Lu14-31/+86
2021-07-20libsanitizer: Merge with upstreamH.J. Lu133-2708/+2284
Merged revision: 7704fedfff6ef5676adb6415f3be0ac927d1a746
2021-05-22Daily bump.GCC Administrator1-0/+8
2021-05-21libsanitizer: Remove cyclades from libsanitizerTamar Christina3-30/+0
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-13libsanitizer: cherry-pick from upstreamH.J. Lu1-1/+1
cherry-pick: 72797dedb720 [sanitizer] Use size_t on g_tls_size to fix build on x32
2021-05-14Daily bump.GCC Administrator1-0/+16
2021-05-13libsanitizer : Update LOCAL_PATCHES.Iain Sandoe1-0/+1
This adds the local patch to handle missing __builtin_os_log_format on Darwin. libsanitizer/ChangeLog: * LOCAL_PATCHES: Add Darwin patch for __builtin_os_log_format.
2021-05-13libsanitizer, Darwin : Handle missing __builtin_os_log_format.Iain Sandoe1-1/+9
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-13libsanitizer: update LOCAL_PATCHES.Martin Liska1-2/+1
libsanitizer/ChangeLog: * LOCAL_PATCHES: Update to the corresponding revision.
2021-05-13libsanitizer: Apply local patches.Martin Liska14-30/+77
2021-05-13libsanitizer: merge from masterMartin Liska153-1239/+2538
Merged revision: f58e0513dd95944b81ce7a6e7b49ba656de7d75f
2021-04-18Daily bump.GCC Administrator1-0/+7
2021-04-17sanitizer: Fix asan against glibc 2.34 [PR100114]Jakub Jelinek1-5/+8
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-03-09Daily bump.GCC Administrator1-0/+13
2021-03-08libsanitizer: cherry-pick ad294e572bc5c16f9dc420cc994322de6ca3fbfbMartin Liska4-2/+31
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-02-23Fix UBSAN in __ubsan::Value::getSIntValueMartin Liska1-1/+1
/home/marxin/Programming/gcc2/libsanitizer/ubsan/ubsan_value.cpp:77:25: runtime error: left shift of 0x0000000000000000fffffffffffffffb by 96 places cannot be represented in type '__int128' #0 0x7ffff754edfe in __ubsan::Value::getSIntValue() const /home/marxin/Programming/gcc2/libsanitizer/ubsan/ubsan_value.cpp:77 #1 0x7ffff7548719 in __ubsan::Value::isNegative() const /home/marxin/Programming/gcc2/libsanitizer/ubsan/ubsan_value.h:190 #2 0x7ffff7542a34 in handleShiftOutOfBoundsImpl /home/marxin/Programming/gcc2/libsanitizer/ubsan/ubsan_handlers.cpp:338 #3 0x7ffff75431b7 in __ubsan_handle_shift_out_of_bounds /home/marxin/Programming/gcc2/libsanitizer/ubsan/ubsan_handlers.cpp:370 #4 0x40067f in main (/home/marxin/Programming/testcases/a.out+0x40067f) #5 0x7ffff72c8b24 in __libc_start_main (/lib64/libc.so.6+0x27b24) #6 0x4005bd in _start (/home/marxin/Programming/testcases/a.out+0x4005bd) Differential Revision: https://reviews.llvm.org/D97263 Cherry-pick from 16ede0956cb1f4b692dfa619ccfa6ab1de28e19b.
2021-01-27Daily bump.GCC Administrator1-0/+6
2021-01-26liblsan: build missing lsan_posix.cpp fileMartin Liska2-3/+6
libsanitizer/ChangeLog: PR sanitizer/98828 * lsan/Makefile.am: Add missing lsan_posix.cpp file. * lsan/Makefile.in: Likewise.