aboutsummaryrefslogtreecommitdiff
path: root/libsanitizer
AgeCommit message (Collapse)AuthorFilesLines
2016-05-17re PR sanitizer/71160 (libasan: Backport support for malloc within dlsym)Jakub Jelinek2-10/+39
PR sanitizer/71160 * asan/asan_malloc_linux.cc: Cherry pick upstream r254395 and r269633. From-SVN: r236314
2016-04-21Cherry-pick r266868 from upstream.Maxim Ostapenko2-1/+10
PR sanitizer/70624 * asan/asan_mac.cc: Cherry pick upstream r266868. From-SVN: r235338
2016-01-19re PR sanitizer/68824 (libtsan is missing the __interceptor___tls_get_addr ↵Jakub Jelinek2-0/+21
symbol without bumping the soname) PR sanitizer/68824 * tsan/tsan_interceptors.cc (NEED_TLS_GET_ADDR, __tls_get_addr, InitializeInterceptors): Cherry pick upstream r258119. From-SVN: r232555
2016-01-14configure.ac: Replace the hard-coded -ldl requirement for ↵Andreas Tobler3-4/+56
link_sanitizer_common with a... 2016-01-14 Andreas Tobler <andreast@gcc.gnu.org> * configure.ac: Replace the hard-coded -ldl requirement for link_sanitizer_common with a configure time check for -ldl. * configure: Regenerate. From-SVN: r232385
2015-11-24Move ptrace.h to appropriate place.Max Ostapenko2-1/+6
libsanitizer/ * include/system/linux/asm/ptrace.h: Move to ... * include/system/asm/ptrace.h: ... this. From-SVN: r230804
2015-11-24Fix libsanitizer build with old kernel headers on ARM after r230739.Max Ostapenko2-0/+11
libsanitizer/ * include/system/linux/asm/ptrace.h: New header. From-SVN: r230790
2015-11-23libsanitizer merge from upstream r253555.Max Ostapenko65-778/+1709
libsanitizer/ 2015-11-23 Maxim Ostapenko <m.ostapenko@partner.samsung.com> * All source files: Merge from upstream r253555. * configure.tgt: Enable LSan on aarch64-*-linux* targets. Add new dependences for TSan for aarch64-*-linux* targets. * tsan/Makefile.am: Add new source files. * configure: Regenerate. * tsan/Makefile.in: Likewise. From-SVN: r230739
2015-11-09Update libsanitizer obstack interceptorsAlan Modra14-11/+99
New obstack uses sensible types, size_t instead of int for length params. Since libsanitizer does not use prototypes from obstack.h to call the real functions, it's necessary to update the libsanitizer function declarations emitted by the INTERCEPTOR macro. * sanitizer_common/sanitizer_common_interceptors.inc: Update size params for _obstack_begin_1, _obstack_begin, _obstack_newchunk interceptors. * configure.ac: Substitute OBSTACK_DEFS. * asan/Makefile.am: Add OBSTACK_DEFS to DEFS. * tsan/Makefile.am: Likewise. * configure: Regenerate. * Makefile.in: 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. From-SVN: r229986
2015-10-23Update HOWTO_MERGE file for libsanitizer.Maxim Ostapenko1-18/+31
From-SVN: r229215
2015-10-22Fix bootstrap on x86_64-apple-darwin14 after r229119.Max Ostapenko5-31/+128
libsanitizer/ PR bootstrap/68041 * configure.ac (link_sanitizer_common): Link against librt only if it contains shm_open, required by sanitizers. (CXX_ABI_NEEDED): Remove variable. * configure: Regenerate. * ubsan/Makefile.am (libubsan_la_LIBADD): Do not add -lc++abi anymore. * ubsan/Makefile.in: Regenerate. From-SVN: r229168
2015-10-21HOWTO_MERGE: New file.Max Ostapenko2-0/+30
libsanitizer/ * HOWTO_MERGE: New file. From-SVN: r229116
2015-10-21sanitizer_stacktrace.cc (GetCanonicFrame): Assume we compiled code with GCC ↵Max Ostapenko2-2/+8
when extracting the caller PC for ARM if... libsanitizer/ * sanitizer_common/sanitizer_stacktrace.cc (GetCanonicFrame): Assume we compiled code with GCC when extracting the caller PC for ARM if no valid frame pointer is available. From-SVN: r229115
2015-10-21re PR bootstrap/63888 (bootstrap failed when configured with ↵Max Ostapenko2-1/+14
-with-build-config=bootstrap-asan --disable-werror) libsanitizer/ PR bootstrap/63888 Reapply: 2015-02-20 Jakub Jelinek <jakub@redhat.com> * asan/asan_globals.cc (RegisterGlobal): Disable detect_odr_violation support until it is rewritten upstream. * c-c++-common/asan/pr63888.c: New test. From-SVN: r229114
2015-10-21re PR sanitizer/63958 (bootstrap failure in the sanitizer libs on ↵Max Ostapenko3-3/+76
sparc-linux-gnu) libsanitizer/ PR sanitizer/63958 Reapply: 2014-10-14 David S. Miller <davem@davemloft.net> * sanitizer_common/sanitizer_platform_limits_linux.cc (time_t): Define at __kernel_time_t, as needed for sparc. (struct __old_kernel_stat): Don't check if __sparc__ is defined. * libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h (__sanitizer): Define struct___old_kernel_stat_sz, struct_kernel_stat_sz, and struct_kernel_stat64_sz for sparc. (__sanitizer_ipc_perm): Adjust for sparc targets. (__sanitizer_shmid_ds): Likewsie. (__sanitizer_sigaction): Likewise. (IOC_SIZE): Likewsie. From-SVN: r229113
2015-10-21libsanitizer merge from upstream r250806.Max Ostapenko218-6443/+12307
libsanitizer/ 2015-10-20 Maxim Ostapenko <m.ostapenko@partner.samsung.com> * All source files: Merge from upstream r250806. * configure.ac (link_sanitizer_common): Add -lrt flag. * configure.tgt: Enable TSAN and LSAN for aarch64-linux targets. Set CXX_ABI_NEEDED=true for darwin. * asan/Makefile.am (asan_files): Add new files. (DEFS): Add DCAN_SANITIZE_UB=0 and remove unused and legacy DASAN_FLEXIBLE_MAPPING_AND_OFFSET=0. * asan/Makefile.in: Regenerate. * ubsan/Makefile.am (ubsan_files): Add new files. (DEFS): Add DCAN_SANITIZE_UB=1. (libubsan_la_LIBADD): Add -lc++abi if CXX_ABI_NEEDED is true. * ubsan/Makefile.in: Regenerate. * tsan/Makefile.am (tsan_files): Add new files. (DEFS): Add DCAN_SANITIZE_UB=0. * tsan/Makefile.in: Regenerate. * sanitizer_common/Makefile.am (sanitizer_common_files): Add new files. * sanitizer_common/Makefile.in: Regenerate. * asan/libtool-version: Bump the libasan SONAME. From-SVN: r229111
2015-09-09Fix sanitizer/67258 by cherry picking upstream patchMarkus Trippelsdorf2-3/+8
PR sanitizer/67258 * ubsan/ubsan_type_hash.cc: Cherry pick upstream r244101. Upstraem patch: commit 1d2477faafda9ad2cc19927b3c31efd22747f013 Author: Alexey Samsonov <vonosmas@gmail.com> Date: Wed Aug 5 19:35:46 2015 +0000 [UBSan] Fix UBSan-vptr false positive. Offset from vptr to the start of most-derived object can actually be positive in some virtual base class vtables. Patch by Stephan Bergmann! git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@244101 91177308-0d34-0410-b5e6-96231b3b80d8 From-SVN: r227591
2015-07-29Use fast unwinder for PowerPCMarkus Trippelsdorf2-2/+7
2015-07-29 Markus Trippelsdorf <markus@trippelsdorf.de> PR sanitizer/63927 * sanitizer_common/sanitizer_stacktrace.h: Use fast unwinder for PowerPC. From-SVN: r226338
2015-07-29re PR sanitizer/63927 (AddressSanitizer painfully slow on ppc64)Bill Schmidt2-0/+19
2015-07-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com> PR sanitizer/63927 * sanitizer_common/sanitizer_stacktrace.cc (BufferedStackTrace::FastUnwindStack): Fix code for PowerPC to find the link register at an offset of 16 from the base of the caller's stack frame. From-SVN: r226335
2015-05-13libsanitizer: Bump to automake 1.11.6Michael Haubenwallner11-121/+410
2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com> * Makefile.in: Regenerated with automake-1.11.6. * aclocal.m4: Likewise. * asan/Makefile.in: Likewise. * configure: 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. From-SVN: r223140
2015-04-13re PR sanitizer/64839 (libsanitizer shouldn't require <rpc/xdr.h>)Yury Gribov15-6/+110
2015-04-13 Yury Gribov <y.gribov@samsung.com> PR sanitizer/64839 libsanitizer/ * sanitizer_common/sanitizer_platform.h: Cherry pick upstream r234470. * sanitizer_common/sanitizer_platform_limits_posix.cc: Ditto. * configure.ac (RPC_DEFS): Check for precense of RPC headers. * sanitizer_common/Makefile.am (DEFS): Pass info to compiler. * Makefile.in: Regenerate. * asan/Makefile.in: Regenerate. * config.h.in: Regenerate. * configure: 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. From-SVN: r222043
2015-03-23re PR sanitizer/59009 (libsanitizer merge from upstream r191666 breaks ↵Christophe Lyon4-1/+24
bootstrap on powerpc64-linux and aarch64-linux) 2015-03-23 Christophe Lyon <christophe.lyon@linaro.org> PR sanitizer/59009 * sanitizer_common/sanitizer_platform_limits_posix.cc: Cherry pick upstream r230324. * sanitizer_common/sanitizer_platform.h: Likewise. * sanitizer_common/sanitizer_common_syscalls.inc: Likewise. From-SVN: r221593
2015-03-11tsan_rtl_report.cc (ScopedReport::AddThread): Cherry pick upstream 224508 ↵Bernd Edlinger2-1/+7
and 224755. 2015-03-11 Bernd Edlinger <bernd.edlinger@hotmail.de> * tsan/tsan_rtl_report.cc (ScopedReport::AddThread): Cherry pick upstream 224508 and 224755. From-SVN: r221356
2015-03-09re PR sanitizer/63958 (bootstrap failure in the sanitizer libs on ↵Jakub Jelinek3-3/+76
sparc-linux-gnu) PR sanitizer/63958 Reapply: 2014-10-14 David S. Miller <davem@davemloft.net> * sanitizer_common/sanitizer_platform_limits_linux.cc (time_t): Define at __kernel_time_t, as needed for sparc. (struct __old_kernel_stat): Don't check if __sparc__ is defined. * libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h (__sanitizer): Define struct___old_kernel_stat_sz, struct_kernel_stat_sz, and struct_kernel_stat64_sz for sparc. (__sanitizer_ipc_perm): Adjust for sparc targets. (__sanitizer_shmid_ds): Likewsie. (__sanitizer_sigaction): Likewise. (IOC_SIZE): Likewsie. From-SVN: r221283
2015-02-27* configure.tgt: Enable build on powerpc*le-*-linux.Peter Bergner2-3/+4
From-SVN: r221060
2015-02-24re PR tree-optimization/65170 (curve25519-donna-c64 miscompilation)Jakub Jelinek1-1/+1
PR tree-optimization/65170 * wide-int.cc (wi::mul_internal): For the umul_ppmm optimization, if val[1] < 0, clear also val[2] and return 3. * gcc.c-torture/execute/pr65170.c: New test. * gcc.dg/tree-ssa/vrp96.c: New test. From-SVN: r220931
2015-02-23re PR bootstrap/63888 (bootstrap failed when configured with ↵Jakub Jelinek2-1/+9
-with-build-config=bootstrap-asan --disable-werror) PR bootstrap/63888 * asan/asan_globals.cc (RegisterGlobal): Disable detect_odr_violation support until it is rewritten upstream. * c-c++-common/asan/pr63888.c: New test. From-SVN: r220919
2015-01-27configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.Matthias Klose3-55/+62
2015-01-26 Matthias Klose <doko@ubuntu.com> * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC. * configure: Regenerate. From-SVN: r220165
2015-01-24Include TSAN dependent sources for 64 bit i?86 target. Venkataramanan Kumar4-8/+8
2015-01-25 Venkataramanan Kumar <venkataramanan.kumar@linaro.org> * configure.ac (TSAN_TARGET_DEPENDENT_OBJECTS): Undefine. * configure: Regenerate. * configure.tgt (TSAN_TARGET_DEPENDENT_OBJECTS): Define. From-SVN: r220083
2015-01-23Conditionally include target specific files while building TSAN 2015-01-25...Venkataramanan Kumar12-16/+56
Conditionally include target specific files while building TSAN 2015-01-25 Venkataramanan Kumar <venkataramanan.kumar@linaro.org> * configure.ac (TSAN_TARGET_DEPENDENT_OBJECTS): Define. * configure: Regenerate. * tsan/Makefile.am (EXTRA_libtsan_la_SOURCES): Define. (libtsan_la_DEPENDENCIES): Likewise. * Makefile.in: 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. From-SVN: r220034
2015-01-22* tsan/tsan_rtl.h: Cherry pick upstream r226829.Jakub Jelinek2-1/+5
From-SVN: r220013
2015-01-21re PR sanitizer/64435 (Bootstrap failure in libsanitizer on AArch64 with ↵Jakub Jelinek4-4/+17
Linux kernel <= 3.15) PR sanitizer/64435 * sanitizer_common/sanitizer_platform_limits_posix.h: Cherry pick upstream r226637. * sanitizer_common/sanitizer_platform_limits_posix.cc: Likewise. * sanitizer_common/sanitizer_posix.cc: Cherry pick upstream r226639. From-SVN: r219968
2015-01-20re PR sanitizer/64632 (runtime error: member call on address 0x0000004318a8 ↵Jakub Jelinek2-26/+26
which does not point to an object of type 'ios_base') PR sanitizer/64632 * ubsan/ubsan_type_hash.cc: Cherry pick upstream r224972. * g++.dg/ubsan/pr64632.C: New test. From-SVN: r219912
2015-01-19re PR sanitizer/64435 (Bootstrap failure in libsanitizer on AArch64 with ↵Jakub Jelinek2-0/+10
Linux kernel <= 3.15) PR sanitizer/64435 * sanitizer_common/sanitizer_platform_limits_posix.cc: Cherry pick upstream r223925. From-SVN: r219833
2015-01-13sanitizer_deadlock_detector.h: Cherry pick upstream r224518 and r224519.Jakub Jelinek3-5/+17
* sanitizer_common/sanitizer_deadlock_detector.h: Cherry pick upstream r224518 and r224519. * tsan/tsan_rtl_thread.cc: Cherry pick upstream r224702 and r224834. From-SVN: r219545
2014-12-16sanitizer_symbolizer_libbacktrace.cc, [...]: Cherry pick upstream r224308.Jakub Jelinek4-6/+13
* sanitizer_common/sanitizer_symbolizer_libbacktrace.cc, sanitizer_common/sanitizer_symbolizer_libbacktrace.h, sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc: Cherry pick upstream r224308. From-SVN: r218778
2014-11-21Always use PIC option with -shared in libtoolH.J. Lu2-3/+8
Libtool needs to pass PIC option -shared when creating shared object to link regular object files with slim-lto archive. PR bootstrap/63784 * libtool.m4: Add $pic_flag with -shared. boehm-gc/ PR bootstrap/63784 * configure: Regenerated. gcc/ PR bootstrap/63784 * configure: Regenerated. libatomic/ PR bootstrap/63784 * configure: Regenerated. libbacktrace/ PR bootstrap/63784 * configure: Regenerated. libcc1/ PR bootstrap/63784 * configure: Regenerated. libcilkrts/ PR bootstrap/63784 * configure: Regenerated. libffi/ PR bootstrap/63784 * configure: Regenerated. libgfortran/ PR bootstrap/63784 * configure: Regenerated. libgomp/ PR bootstrap/63784 * configure: Regenerated. libitm/ PR bootstrap/63784 * configure: Regenerated. libjava/ PR bootstrap/63784 * configure: Regenerated. libjava/classpath/ PR bootstrap/63784 * configure: Regenerated. libobjc/ PR bootstrap/63784 * configure: Regenerated. libquadmath/ PR bootstrap/63784 * configure: Regenerated. libsanitizer/ PR bootstrap/63784 * configure: Regenerated. libssp/ PR bootstrap/63784 * configure: Regenerated. libstdc++-v3/ PR bootstrap/63784 * configure: Regenerated. libvtv/ PR bootstrap/63784 * configure: Regenerated. lto-plugin/ PR bootstrap/63784 * configure: Regenerated. From-SVN: r217937
2014-11-21re PR sanitizer/64013 (libsanitizer fails to build)Jakub Jelinek2-4/+8
PR sanitizer/64013 * sanitizer_common/sanitizer_linux.cc (FileExists): Cherry pick upstream r222532. From-SVN: r217921
2014-11-14Makefile.am (AM_CXXFLAGS): Use -std=gnu++11.Uros Bizjak15-15/+36
* sanitizer_common/Makefile.am (AM_CXXFLAGS): Use -std=gnu++11. * asan/Makefile.am (AM_CXXFLAGS): Ditto. * lsan/Makefile.am (AM_CXXFLAGS): Ditto. * interception/Makefile.am (AM_CXXFLAGS): Ditto. * tsan/Makefile.am (AM_CXXFLAGS): Ditto. * libbacktrace/Makefile.am (AM_CXXFLAGS): Ditto. * ubsan/Makefile.am (AM_CXXFLAGS): Ditto. * sanitizer_common/Makefile.in: Regenerate. * asan/Makefile.in: Ditto. * lsan/Makefile.in: Ditto. * interception/Makefile.in: Ditto. * tsan/Makefile.in: Ditto. * libbacktrace/Makefile.in: Ditto. * ubsan/Makefile.in: Ditto. From-SVN: r217562
2014-11-13libsanitizer merge from upstream r221802Kostya Serebryany98-1208/+1992
From-SVN: r217518
2014-11-11re PR target/63610 (Fixing the libtool bug for Yosemite (darwin14))Francois-Xavier Coudert2-1/+6
toplevel: 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * libtool.m4: Fix globbing of darwin versions. boehm-gc/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. gcc/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libatomic/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libbacktrace/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libcc1/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libcilkrts/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libffi/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libgfortran/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libgomp/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libitm/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libobjc/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libquadmath/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libsanitizer/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libssp/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libstdc++-v3/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libvtv/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. lto-plugin/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libjava/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libjava/classpath/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. zlib/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. From-SVN: r217366
2014-10-16IPA ICF fallout: fox for libasan and pr43077-1.cMartin Liska3-2/+8
* gcc.dg/guality/pr43077-1.c: IPA ICF disabled to match defined expectations. * asan/Makefile.am: IPA ICF pass is disabled. * asan/Makefile.in: Likewise. From-SVN: r216339
2014-10-14Fix sanitizer build on sparc.David S. Miller3-3/+72
* sanitizer_common/sanitizer_platform_limits_linux.cc (time_t): Define at __kernel_time_t, as needed for sparc. (struct __old_kernel_stat): Don't check if __sparc__ is defined. * libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h (__sanitizer): Define struct___old_kernel_stat_sz, struct_kernel_stat_sz, and struct_kernel_stat64_sz for sparc. (__sanitizer_ipc_perm): Adjust for sparc targets. (__sanitizer_shmid_ds): Likewsie. (__sanitizer_sigaction): Likewsie. (IOC_SIZE): Likewsie. From-SVN: r216224
2014-10-14Makefile.am (DEFS): Add -DPIC.Jakub Jelinek3-2/+7
* ubsan/Makefile.am (DEFS): Add -DPIC. * ubsan/Makefile.in: Regenerated. From-SVN: r216206
2014-09-26[AArch64] Enable Address Sanitizer.Christophe Lyon2-0/+6
2014-09-26 Christophe Lyon <christophe.lyon@linaro.org> [AArch64] Enable Address Sanitizer. gcc/ * config/aarch64/aarch64-linux.h (ASAN_CC1_SPEC): Define. (CC1_SPEC): Define. * config/aarch64/aarch64.c (aarch64_asan_shadow_offset): New function. (TARGET_ASAN_SHADOW_OFFSET): Define. libsanitzer/ * configure.tgt: Enable build on aarch64*-linux. From-SVN: r215642
2014-09-23[libsanitizer merge from upstream r218156]Kostya Serebryany160-3746/+6335
From-SVN: r215527
2014-09-10flag-types.h (enum sanitize_code): Add SANITIZE_NONNULL_ATTRIBUTE and ↵Jakub Jelinek3-0/+62
SANITIZE_RETURNS_NONNULL_ATTRIBUTE... gcc/ * flag-types.h (enum sanitize_code): Add SANITIZE_NONNULL_ATTRIBUTE and SANITIZE_RETURNS_NONNULL_ATTRIBUTE, or them into SANITIZE_UNDEFINED. * opts.c (common_handle_option): Handle SANITIZE_NONNULL_ATTRIBUTE and SANITIZE_RETURNS_NONNULL_ATTRIBUTE and disable flag_delete_null_pointer_checks for them. * sanitizer.def (BUILT_IN_UBSAN_HANDLE_NONNULL_ARG, BUILT_IN_UBSAN_HANDLE_NONNULL_ARG_ABORT, BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN, BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_ABORT): New. * ubsan.c (instrument_bool_enum_load): Set *gsi back to stmt's iterator. (instrument_nonnull_arg, instrument_nonnull_return): New functions. (pass_ubsan::gate): Return true even for SANITIZE_NONNULL_ATTRIBUTE or SANITIZE_RETURNS_NONNULL_ATTRIBUTE. (pass_ubsan::execute): Call instrument_nonnull_{arg,return}. * doc/invoke.texi (-fsanitize=nonnull-attribute, -fsanitize=returns-nonnull-attribute): Document. gcc/testsuite/ * c-c++-common/ubsan/attrib-3.c: New test. * c-c++-common/ubsan/nonnull-1.c: New test. * c-c++-common/ubsan/nonnull-2.c: New test. * c-c++-common/ubsan/nonnull-3.c: New test. * c-c++-common/ubsan/nonnull-4.c: New test. * c-c++-common/ubsan/nonnull-5.c: New test. libsanitizer/ * ubsan/ubsan_handlers.cc, ubsan/ubsan_handlers.h: Cherry pick upstream r215485, r217389, r217391 and r217400. From-SVN: r215118
2014-06-23sanitizer_common_interceptors.inc: Cherry pick upstream r211008.Paolo Carlini2-3/+9
2014-06-23 Paolo Carlini <paolo.carlini@oracle.com> * sanitizer_common/sanitizer_common_interceptors.inc: Cherry pick upstream r211008. From-SVN: r211912
2014-06-11asan_linux.cc: Cherry pick upstream r210012.Richard Biener2-0/+8
2014-06-11 Richard Biener <rguenther@suse.de> * asan/asan_linux.cc: Cherry pick upstream r210012. From-SVN: r211453
2014-05-30sanitizer_stacktrace.cc: Cherry pick upstream r209879.Jakub Jelinek7-30/+58
* sanitizer_common/sanitizer_stacktrace.cc: Cherry pick upstream r209879. * sanitizer_common/sanitizer_common.h: Likewise. * asan/asan_mapping.h: Likewise. * asan/asan_linux.cc: Likewise. * tsan/tsan_mman.cc: Cherry pick upstream r209744. * sanitizer_common/sanitizer_allocator.h: Likewise. From-SVN: r211080
2014-05-23builtins.def: Change SANITIZE_FLOAT_DIVIDE to SANITIZE_NONDEFAULT.Marek Polacek2-0/+6
* builtins.def: Change SANITIZE_FLOAT_DIVIDE to SANITIZE_NONDEFAULT. * gcc.c (sanitize_spec_function): Likewise. * convert.c (convert_to_integer): Include "ubsan.h". Add floating-point to integer instrumentation. * doc/invoke.texi: Document -fsanitize=float-cast-overflow. * flag-types.h (enum sanitize_code): Add SANITIZE_FLOAT_CAST and SANITIZE_NONDEFAULT. * opts.c (common_handle_option): Handle -fsanitize=float-cast-overflow. * sanitizer.def (BUILT_IN_UBSAN_HANDLE_FLOAT_CAST_OVERFLOW, BUILT_IN_UBSAN_HANDLE_FLOAT_CAST_OVERFLOW_ABORT): Add. * ubsan.c: Include "realmpfr.h" and "dfp.h". (get_ubsan_type_info_for_type): Handle REAL_TYPEs. (ubsan_type_descriptor): Set tkind to 0xffff for types other than float/double/long double. (ubsan_instrument_float_cast): New function. * ubsan.h (ubsan_instrument_float_cast): Declare. testsuite/ * c-c++-common/ubsan/float-cast-overflow-1.c: New test. * c-c++-common/ubsan/float-cast-overflow-10.c: New test. * c-c++-common/ubsan/float-cast-overflow-2.c: New test. * c-c++-common/ubsan/float-cast-overflow-3.c: New test. * c-c++-common/ubsan/float-cast-overflow-4.c: New test. * c-c++-common/ubsan/float-cast-overflow-5.c: New test. * c-c++-common/ubsan/float-cast-overflow-6.c: New test. * c-c++-common/ubsan/float-cast-overflow-7.c: New test. * c-c++-common/ubsan/float-cast-overflow-7.h: New file. * c-c++-common/ubsan/float-cast-overflow-8.c: New test. * c-c++-common/ubsan/float-cast-overflow-9.c: New test. * c-c++-common/ubsan/float-cast.h: New file. * g++.dg/ubsan/float-cast-overflow-bf.C: New test. * gcc.dg/ubsan/float-cast-overflow-bf.c: New test. libsanitizer/ * ubsan/ubsan_value.cc (getFloatValue): Handle 96-bit floating-point types. Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r210862