aboutsummaryrefslogtreecommitdiff
path: root/libsanitizer
AgeCommit message (Collapse)AuthorFilesLines
2019-08-16libsanitizer, record a local patch.Iain Sandoe2-0/+5
2019-08-16 Iain Sandoe <iain@sandoe.co.uk> * LOCAL_PATCHES: Add r274585. From-SVN: r274586
2019-08-16libsanitize, asan - reapply r272406Iain Sandoe2-1/+10
The entry in LOCAL_PATCHES was accidentally omitted. 2019-08-16 Iain Sandoe <iain@sandoe.co.uk> * asan/asan_interceptors.h: Reapply r272406. From-SVN: r274585
2019-08-15Add r274540 to LOCAL_PATCHES.Martin Liska2-0/+5
2019-08-15 Martin Liska <mliska@suse.cz> * LOCAL_PATCHES: Add r274540 From-SVN: r274541
2019-08-15Reapply missing patch for libsanitizer.Martin Liska2-0/+5
2019-08-15 Martin Liska <mliska@suse.cz> * tsan/tsan_rtl_ppc64.S: Reapply. From-SVN: r274540
2019-08-15[libsanitizer] Fix PR bootstrap/91455Iain Sandoe12-977/+519
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-14Refresh LOCAL_PATCHESMartin Liska2-6/+5
2019-08-14 Martin Liska <mliska@suse.cz> * LOCAL_PATCHES: Refresh based on what was committed. From-SVN: r274430
2019-08-14Reapply all revisions mentioned in LOCAL_PATCHES.Martin Liska11-29/+68
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-14Libsanitizer merge from trunk r368656.Martin Liska399-4514/+11983
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-06-26Fix sanitizer_common/sanitizer_posix_libcdep.cc compilation on Solaris 11.5Rainer Orth2-3/+8
* sanitizer_common/sanitizer_posix_libcdep.cc: Cherry-pick compiler-rt revision 363778. From-SVN: r272685
2019-06-18libsanitizer - remove reference to __cxa_rethrow_primary_exception.Iain Sandoe5-4/+20
For some Darwin versions the absence of the rethrow_primary_exception symbol causes almost all sanitizer tests to fail. The symbol is not present in libstdc++ and, therefore is is correct to remove the reference to it for all platforms. We do this by adding a new guard "ASAN_HAS_CXA_RETHROW_PRIMARY_EXCEPTION". libsanitizer/ 2019-06-18 Iain Sandoe <iain@sandoe.co.uk> PR libsanitizer/87880 * asan/asan_interceptors.h: (ASAN_INTERCEPT___CXA_RETHROW_PRIMARY_EXCEPTION): New. * asan/Makefile.am (DEFS): Add ASAN_HAS_CXA_RETHROW_PRIMARY_EXCEPTION, defined to 0. * asan/Makefile.in: Regenerated. * asan/libtool-version: Bump version. From-SVN: r272406
2019-05-27rs6000: Fix sanitizer build (PR90639)Segher Boessenkool2-0/+6
The assembler code needs to say it uses AltiVec instructions. libsanitizer/ PR target/90639 * tsan/tsan_rtl_ppc64.S: Add ".machine altivec". From-SVN: r271668
2019-05-14Remove obsolete Solaris 10 supportRainer Orth3-12/+6
libstdc++-v3: * config/os/solaris/solaris2.10: Move to ... * config/os/solaris: ... this. * configure.host (os_include_dir): Adapt. (abi_baseline_pair): Remove Solaris 10 handling. * config/abi/post/i386-solaris2.10: Remove. * config/abi/post/sparc-solaris2.10: Remove. * config/abi/post/i386-solaris2.11: Rename to ... * config/abi/post/i386-solaris: ... this. * config/abi/post/sparc-solaris2.11: Rename to ... * config/abi/post/sparc-solaris: ... this. * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove workaround. * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10 xfail. libsanitizer: * configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10* handling. * configure: Regenerate. libgcc: * config.host: Simplify various *-*-solaris2.1[0-9]* to *-*-solaris2*. * configure.ac: Likewise. * configure: Regenerate. * config/i386/sol2-unwind.h (x86_fallback_frame_state): Remove Solaris 10 and Solaris 11 < snv_125 handling. libbacktrace: * configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10* handling. * configure: Regenerate. gcc/testsuite: * gcc.dg/atomic/c11-atomic-exec-4.c: Simplify triplet to *-*-solaris2*. * gcc.dg/atomic/c11-atomic-exec-5.c: Likewise. * gcc.dg/c99-math-double-1.c: Likewise. * gcc.dg/c99-math-float-1.c: Likewise. * gcc.dg/c99-math-long-double-1.c: Likewise. * gcc.misc-tests/linkage.exp: Simplify triplet to x86_64-*-solaris2*. * gcc.target/i386/mcount_pic.c: Remove *-*-solaris2.10* && !gld xfail. * gcc.target/i386/pr63620.c: Likewise. * lib/target-supports.exp (check_sse_os_support_available): Remove Solaris 9/x86 workaround. gcc: * config.gcc: Move *-*-solaris2.10* from obsolete configurations to unsupported ones. Simplify x86_64-*-solaris2.1[0-9]* to x86_64-*-solaris2*. * config.host: Likewise. * config/i386/sol2.h (ASM_COMMENT_START): Remove. * config/sparc/driver-sparc.c (host_detect_local_cpu) [__sun__ && __svr4__]: Remove "brand" fallback. [!KSTAT_DATA_STRING]: Remove. * configure.ac (gcc_cv_ld_hidden): Simplify *-*-solaris2.1[0-9]* to *-*-solaris2*. (comdat_group): Likewise. (set_have_as_tls): Likewise. (gcc_cv_target_dl_iterate_phdr): Likewise. (gcc_cv_as_shf_merge): Remove Solaris 10/x86 workaround. (gcc_cv_ld_aligned_shf_merge): Remove Solaris 10/SPARC workaround. * configure: Regenerate. * doc/install.texi: Simplify Solaris target triplets. (Specific, i?86-*-solaris2*): Remove Solaris 10 references. (Specific, *-*-solaris2*): Document Solaris 10 removal. Remove Solaris 10 references. Remove obsolete Solaris bug reference. (Specific, sparc-sun-solaris2.10): Remove. From-SVN: r271183
2019-04-08LOCAL_PATCHES: Add revision.Martin Liska2-0/+5
From-SVN: r270209
2019-04-08Add missing libsanitizer extra patch (r259664) (PR sanitizer/89941).Martin Liska3-3/+14
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-03-13re PR sanitizer/80953 (Support libsanitizer on Solaris)Eric Botcazou4-1/+129
PR sanitizer/80953 Merge from LLVM revision 355980 * asan/asan_allocator.h (kAllocatorSpace): Define for SPARC. (kAllocatorSize): Likewise. (DefaultSizeClassMap): Likewise. * asan/asan_mapping.h (kSPARC64_ShadowOffset64): Define. (SHADOW_OFFSET): Define for SPARC. Include asan_mapping_sparc64.h for SPARC 64-bit. * asan/asan_mapping_sparc64.h: New file. From-SVN: r269641
2019-03-13re PR sanitizer/80953 (Support libsanitizer on Solaris)Eric Botcazou2-0/+11
PR sanitizer/80953 Merge from LLVM revision 355979 * asan/asan_globals.c (GetGlobalsForAddress): Use internal_memcpy to copy Global objects for SPARC with GCC. From-SVN: r269640
2019-03-13re PR sanitizer/80953 (Support libsanitizer on Solaris)Eric Botcazou4-0/+35
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-13re PR sanitizer/80953 (Support libsanitizer on Solaris)Eric Botcazou6-35/+93
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-06Charry pick libsanitizer r355488 (PR sanitizer/88684).Martin Liska3-3/+12
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-02-20libsanitizer: Restore internal_readlink for x32H.J. Lu2-1/+7
Cherry-pick compiler-rt revision 354451: r316591 has @@ -389,13 +383,11 @@ uptr internal_dup2(int oldfd, int newfd) { } uptr internal_readlink(const char *path, char *buf, uptr bufsize) { -#if SANITIZER_NETBSD - return internal_syscall_ptr(SYSCALL(readlink), path, buf, bufsize); -#elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS +#if SANITIZER_USES_CANONICAL_LINUX_SYSCALLS return internal_syscall(SYSCALL(readlinkat), AT_FDCWD, (uptr)path, (uptr)buf, bufsize); #else - return internal_syscall(SYSCALL(readlink), (uptr)path, (uptr)buf, bufsize); + return internal_syscall_ptr(SYSCALL(readlink), path, buf, bufsize); #endif } which dropped the (uptr) cast and broke x32. This patch puts back the (uptr) cast to restore x32 and fixes: https://bugs.llvm.org/show_bug.cgi?id=40783 Differential Revision: https://reviews.llvm.org/D58413 PR sanitizer/89409 * sanitizer_common/sanitizer_linux.cc (internal_readlink): Cherry-pick compiler-rt r354451. From-SVN: r269042
2019-01-23re PR sanitizer/89010 (Update URLs in libsanitizer/README.gcc)Jonny Grant2-4/+9
PR sanitizer/89010 * libsanitizer/README.gcc: Update to current https URLs. From-SVN: r268183
2019-01-12Remove svn:executable property from a couple of text filesJakub Jelinek1-0/+0
which shouldn't be executable. From-SVN: r267873
2018-12-27Cherry pick libsanitizer patch (https://reviews.llvm.org/D54856).Martin Liska3-7/+12
2018-12-27 Martin Liska <mliska@suse.cz> PR sanitizer/86229 * asan/asan_errors.cc (ErrorAllocTypeMismatch::Print): Cherry pick rL350085. * asan/asan_errors.h (struct ErrorAllocTypeMismatch): Likewise. From-SVN: r267432
2018-11-09Include patch in LOCAL_PATCHES.Martin Liska2-0/+5
2018-11-09 Martin Liska <mliska@suse.cz> * LOCAL_PATCHES: Include one local patch. From-SVN: r265951
2018-11-09Fallback in libsanitizer for scudo sanitizer (PR sanitizer/87892).Martin Liska2-0/+10
2018-11-09 Martin Liska <mliska@suse.cz> PR sanitizer/87892 * sanitizer_common/sanitizer_linux_libcdep.cc (defined): Return 1 when CPU_COUNT macro is not defined. From-SVN: r265950
2018-11-08[PATCH, rs6000] Disable ASLR in sanitizer on powerpc64.Bill Seurer2-0/+16
Cherry pick powerpc64 sanitizer fix from upstream llvm. See https://reviews.llvm.org/rL346030 and https://reviews.llvm.org/D52900. 2018-11-08 Bill Seurer <seurer@linux.vnet.ibm.com> * libsanitizer/sanitizer_common/sanitizer_linux.cc (CheckASLR): Disable ASLR for powerpc64 when using sanitizers. From-SVN: r265941
2018-11-06Enable libsanitizer on Solaris (PR sanitizer/80953)Rainer Orth2-0/+10
gcc: PR sanitizer/80953 * config/sol2.h (ASAN_CC1_SPEC): Define. (LD_WHOLE_ARCHIVE_OPTION): Define. (LD_NO_WHOLE_ARCHIVE_OPTION): Define. (ASAN_REJECT_SPEC): Provide default. (LIBASAN_EARLY_SPEC): Define. (LIBTSAN_EARLY_SPEC): Define. (LIBLSAN_EARLY_SPEC): Define. * config/i386/sol2.h (CC1_SPEC): Redefine. (ASAN_REJECT_SPEC): Define. * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare. (TARGET_ASAN_SHADOW_OFFSET): Define. (sparc_asan_shadow_offset): New function. * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC. (ASAN_REJECT_SPEC): Define. gcc/testsuite: PR sanitizer/80953 * c-c++-common/asan/alloca_loop_unpoisoning.c: Require alloca support. (foo): Use __builtin_alloca. libsanitizer: PR sanitizer/80953 * configure.tgt (sparc*-*-solaris2.11*): Enable. (x86_64-*-solaris2.11* | i?86-*-solaris2.11*): Enable. From-SVN: r265837
2018-11-06Cherry-pick Solaris sanitizer fixes (PR sanitizer/80953)Rainer Orth7-22/+48
PR sanitizer/80953 * sanitizer_common/sanitizer_internal_defs.h, sanitizer_common/sanitizer_platform_limits_solaris.h, sanitizer_common/sanitizer_procmaps_solaris.cc, sanitizer_common/sanitizer_solaris.cc: Cherry-pick compiler-rt revision 346153. * sanitizer_common/sanitizer_stacktrace.h, sanitizer_common/sanitizer_stacktrace_sparc.cc: Cherry-pick compiler-rt revision 346155. From-SVN: r265836
2018-11-05Fix sanitizer frame unwind on 32-bit ABIs (again)Segher Boessenkool3-3/+18
This re-applies r258525, and this time adds it to LOCAL_PATCHES. libsanitizer/ * LOCAL_PATCHES: Add r258525. * sanitizer_common/sanitizer_stacktrace.cc (BufferedStackTrace::FastUnwindStack): Use the correct frame offset for PowerPC SYSV ABI. From-SVN: r265817
2018-11-05Fix build on sparc64-linux-gnu.Martin Liska2-2/+8
2018-11-05 Martin Liska <mliska@suse.cz> PR sanitizer/87860 * sanitizer_common/sanitizer_linux.cc: Cherry-pick upstream r346129. From-SVN: r265796
2018-10-31Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856).Joseph Myers13-1838/+3027
This patch updates GCC to use autoconf 2.69 and automake 1.15.1. (That's not the latest automake version, but it's the one used by binutils-gdb, with which consistency is desirable, and in any case seems a useful incremental update that should make a future update to 1.16.1 easier.) The changes are generally similar to the binutils-gdb ones, and are copied from there where shared files and directories are involved (there are some further changes to such shared directories, however, which I'd expect to apply to binutils-gdb once this patch is in GCC). Largely, obsolete AC_PREREQ calls are removed, while many AC_LANG_SOURCE calls are added to avoid warnings from aclocal and autoconf. Multilib support is no longer included in core automake, meaning that multilib.am needs copying from automake's contrib directory into the GCC source tree. Autoconf 2.69 has Go support, so local copies of that support are removed. I hope the D support will soon be submitted to upstream autoconf so the local copy of that can be removed in a future update. Changes to how automake generates runtest calls mean quotes are removed from RUNTEST definitions in five lib*/testsuite/Makefile.am files (libatomic, libgomp, libitm, libphobos, libvtv; some others have RUNTEST definitions without quotes, which are still OK); libgo and libphobos also get -Wno-override added to AM_INIT_AUTOMAKE so those overrides of RUNTEST do not generate automake warnings. Note that the regeneration did not include regeneration of fixincludes/config.h.in (attempting such regeneration resulted in all the USED_FOR_TARGET conditionals disappearing; and I don't see anything in the fixincludes/ directory that would result in such conditionals being generated, unlike in the gcc/ directory). Also note that libvtv/testsuite/other-tests/Makefile.in was not regenerated; that directory is not listed as a subdirectory for which Makefile.in gets regenerated by calling "automake" in libvtv/, so I'm not sure how it's meant to be regenerated. While I mostly fixed warnings should running aclocal / automake / autoconf, there were various such warnings from automake in the libgfortran, libgo, libgomp, liboffloadmic, libsanitizer, libphobos directories that I did not fix, preferring to leave those to the relevant subsystem maintainers. Specifically, most of those warnings were of the following form (example from libgfortran): Makefile.am:48: warning: source file 'caf/single.c' is in a subdirectory, Makefile.am:48: but option 'subdir-objects' is disabled automake: warning: possible forward-incompatibility. automake: At least a source file is in a subdirectory, but the 'subdir-objects' automake: automake option hasn't been enabled. For now, the corresponding output automake: object file(s) will be placed in the top-level directory. However, automake: this behaviour will change in future Automake versions: they will automake: unconditionally cause object files to be placed in the same subdirectory automake: of the corresponding sources. automake: You are advised to start using 'subdir-objects' option throughout your automake: project, to avoid future incompatibilities. I think it's best for the relevant maintainers to add subdir-objects and do any other associated Makefile.am changes needed. In some cases the paths in the warnings involved ../; I don't know if that adds any extra complications to the use of subdir-objects. I've tested this with native, cross and Canadian cross builds. The risk of any OS-specific issues should I hope be rather lower than if a libtool upgrade were included (we *should* do such an upgrade at some point, but it's more complicated - it involves identifying all our local libtool changes to see if any aren't included in the upstream version we update to, and reverting an upstream libtool patch that's inappropriate for use in GCC); I think it would be better to get this update into GCC so that people can test in different configurations and we can fix any issues found, rather than to try to get more and more testing done before it goes in. top level: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * multilib.am: New file. From automake. Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * libtool.m4: Use AC_LANG_SOURCE. * configure.ac: Remove AC_PREREQ, use AC_LANG_SOURCE. * ar-lib: New file. * test-driver: New file. * configure: Re-generate. config: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * math.m4, tls.m4: Use AC_LANG_SOURCE. Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * override.m4 (_GCC_AUTOCONF_VERSION): Bump from 2.64 to 2.69. fixincludes: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * aclocal.m4, configure: Regenerate. gcc: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single line for second argument of AC_DEFINE_UNQUOTED. * doc/install.texi (Tools/packages necessary for modifying GCC): Update to autoconf 2.69 and automake 1.15.1. * aclocal.m4, config.in, configure: Regenerate. gnattools: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * configure: Regenerate. gotools: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * config/go.m4: Remove file. * Makefile.am (ACLOCAL_AMFLAGS): Do not use -I ./config. * configure.ac: Remove AC_PREREQ. Do not include config/go.m4. * Makefile.in, aclocal.m4, configure: Regenerate. intl: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS, remove AC_PREREQ. * configure: Re-generate. * config.h.in: Re-generate. * aclocal.m4: Re-generate. libada: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * configure: Regenerate. libatomic: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * acinclude.m4: Use AC_LANG_SOURCE. * configure.ac: Remove AC_PREREQ. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. libbacktrace: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. libcc1: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure: Regenerate. libcpp: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * aclocal.m4, config.in, configure: Regenerate. libdecnumber: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * configure.ac: Remove AC_PREREQ. * configure: Re-generate. * aclocal.m4. libffi: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. (AUTOMAKE_OPTIONS): Add info-in-builddir. (CLEANFILES): Remove doc/libffi.info. * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure, fficonfig.h.in, include/Makefile.in, man/Makefile.in, testsuite/Makefile.in: Regenerate. libgcc: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * configure: Regenerate. libgfortran: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. libgo [logically part of this change but omitted from the commit]: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * config/go.m4: Remove file. * config/libtool.m4: Use AC_LANG_SOURCE. * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use -Wno-override in AM_INIT_AUTOMAKE call. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. libgomp: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am (AUTOMAKE_OPTIONS): Add info-in-builddir. (CLEANFILES): Remove libgomp.info. * configure.ac: Remove AC_PREREQ. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. libhsail-rt: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure: Regenerate. libiberty: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * configure.ac: Remove AC_PREREQ. * configure: Re-generate. * config.in: Re-generate. libitm: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. (AUTOMAKE_OPTIONS): Add info-in-builddir. (CLEANFILES): Remove libitm.info. * configure.ac: Remove AC_PREREQ. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. libobjc: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * aclocal.m4, config.h.in, configure: Regenerate. liboffloadmic: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. * plugin/Makefile.am: Include multilib.am. * plugin/configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure, plugin/Makefile.in, plugin/aclocal.m4, plugin/configure: Regenerate. libphobos: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. Use -Wno-override in AM_INIT_AUTOMAKE call. * m4/autoconf.m4: Add extra argument to AC_LANG_DEFINE call. * m4/druntime/os.m4: Use AC_LANG_SOURCE. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, libdruntime/Makefile.in, src/Makefile.in, testsuite/Makefile.in: Regenerate. libquadmath: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. (AUTOMAKE_OPTIONS): Remove 1.8. Add info-in-builddir. (all-local): Define outside conditional code. (CLEANFILES): Remove libquadmath.info. * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. libsanitizer: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * Makefile.in, aclocal.m4, asan/Makefile.in, configure, interception/Makefile.in, libbacktrace/Makefile.in, lsan/Makefile.in, sanitizer_common/Makefile.in, tsan/Makefile.in, ubsan/Makefile.in: Regenerate. libssp: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. (AUTOMAKE_OPTIONS): Remove 1.9.5. * configure.ac: Remove AC_PREREQ. Quote argument to AC_RUN_IFELSE. * Makefile.in, aclocal.m4, configure: Regenerate. libstdc++-v3: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure, doc/Makefile.in, include/Makefile.in, libsupc++/Makefile.in, po/Makefile.in, python/Makefile.in, src/Makefile.in, src/c++11/Makefile.in, src/c++17/Makefile.in, src/c++98/Makefile.in, src/filesystem/Makefile.in, testsuite/Makefile.in: Regenerate. libvtv: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. lto-plugin: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. zlib: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * configure.ac: Modernize AC_INIT call, remove AC_PREREQ. * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.8, cygnus, add foreign. * Makefile.in: Re-generate. * aclocal.m4: Re-generate. * configure: Re-generate. From-SVN: r265695
2018-10-31Update LOCAL_PATCHES after libsanitizer merge.Martin Liska2-4/+7
2018-10-31 Martin Liska <mliska@suse.cz> * LOCAL_PATCHES: Update to installed revisions. From-SVN: r265673
2018-10-31New local GCC patch for CAN_SANITIZE_UB ifdef.Martin Liska2-0/+7
2018-10-31 Martin Liska <mliska@suse.cz> * ubsan/ubsan_platform.h: Add ifndef as we define it with -DCAN_SANITIZE_UB CFLAGS. From-SVN: r265669
2018-10-31Revert https://reviews.llvm.org/D40908 which changes asan offset to 1<<44.Martin Liska2-1/+5
2018-10-31 Martin Liska <mliska@suse.cz> * asan/asan_mapping.h: Revert shadow memory offset to 1 << 41. From-SVN: r265668
2018-10-31Apply LOCAL_PATCHES and remove not used ones.Martin Liska7-24/+41
2018-10-31 Martin Liska <mliska@suse.cz> * LOCAL_PATCHES: Update patch list. * asan/asan_globals.cc (CheckODRViolationViaIndicator): Apply patches from GCC's trunk. (CheckODRViolationViaPoisoning): Likewise. (RegisterGlobal): Likewise. * sanitizer_common/sanitizer_mac.cc (defined): Likewise. * sanitizer_common/sanitizer_stacktrace.cc (GetCanonicFrame): Likewise. * ubsan/ubsan_handlers.cc (__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. From-SVN: r265667
2018-10-31Update build system: include new files and run autoheader, autoconf, automakeMartin Liska9-27/+88
2018-10-31 Martin Liska <mliska@suse.cz> * config.h.in: Regenerate. * configure: Likewise. * sanitizer_common/Makefile.am: Include new files, remove old files. * sanitizer_common/Makefile.in: Regenerate. * ubsan/Makefile.am: Include new files, remove old files. * ubsan/Makefile.in: Likewise. * asan/Makefile.am: Include new files. * asan/Makefile.in: Regenerate. From-SVN: r265666
2018-10-31backport: All source files: Merge from upstream 345033.Martin Liska240-3391/+25041
Merge from upstream 345033. 2018-10-31 Martin Liska <mliska@suse.cz> * All source files: Merge from upstream 345033. From-SVN: r265665
2018-10-31Update merge script and HOWTO_MERGE documentation.Martin Liska3-5/+15
2018-10-31 Martin Liska <mliska@suse.cz> * HOWTO_MERGE: Enhance documentation. * merge.sh: Add support for git as well. From-SVN: r265664
2018-08-27Replace 8 spaces with a tabular in ChangeLog files.Martin Liska1-18/+18
From-SVN: r263886
2018-08-02Cherry-pick compiler-rt revision 338606 (PR sanitizer/86022).Martin Liska2-1/+7
Fix sizeof(struct pthread) in glibc 2.14. 2018-08-02 Martin Liska <mliska@suse.cz> PR sanitizer/86022 * sanitizer_common/sanitizer_linux_libcdep.cc (ThreadDescriptorSize): Cherry-pick compiler-rt revision 338606. From-SVN: r263246
2018-08-01Cherry-pick compiler-rt revision 318044 and 319180.Marek Polacek3-38/+95
[PowerPC][tsan] Update tsan to handle changed memory layouts in newer kernels In more recent Linux kernels with 47 bit VMAs the layout of virtual memory for powerpc64 changed causing the thread sanitizer to not work properly. This patch adds support for 47 bit VMA kernels for powerpc64. Tested on several 4.x and 3.x kernel releases. Regtested/bootstrapped on ppc64le-linux with kernel 4.14; applying to trunk/8.3. 2018-08-01 Marek Polacek <polacek@redhat.com> PR sanitizer/86759 * tsan/tsan_platform.h: Cherry-pick compiler-rt revision 318044. * tsan/tsan_platform_linux.cc: Cherry-pick compiler-rt revision 319180. From-SVN: r263229
2018-07-26libsanitizer: Mark REAL(swapcontext) with indirect_return attribute on x86H.J. Lu3-0/+21
Cherry-pick compiler-rt revision 337603: When shadow stack from Intel CET is enabled, the first instruction of all indirect branch targets must be a special instruction, ENDBR. lib/asan/asan_interceptors.cc has ... int res = REAL(swapcontext)(oucp, ucp); ... REAL(swapcontext) is a function pointer to swapcontext in libc. Since swapcontext may return via indirect branch on x86 when shadow stack is enabled, as in this case, int res = REAL(swapcontext)(oucp, ucp); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This function may be returned via an indirect branch. Here compiler must insert ENDBR after call, like call *bar(%rip) endbr64 I opened an LLVM bug: https://bugs.llvm.org/show_bug.cgi?id=38207 to add the indirect_return attribute so that it can be used to inform compiler to insert ENDBR after REAL(swapcontext) call. We mark REAL(swapcontext) with the indirect_return attribute if it is available. This fixed: https://bugs.llvm.org/show_bug.cgi?id=38249 Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D49608 PR target/86560 * asan/asan_interceptors.cc (swapcontext) Cherry-pick compiler-rt revision 337603. * sanitizer_common/sanitizer_internal_defs.h (__has_attribute): Likewise. From-SVN: r263009
2018-07-05RevertJakub Jelinek7-54/+44
2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com> PR sanitizer/84250 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static libasan. * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan. * Makefile.am: Reorder libs. * Makefile.in: Regenerate. * asan/Makefile.am: Define DCAN_SANITIZE_UB=1, add dependancy from libsanitizer_ubsan.la. * asan/Makefile.in: Regenerate. * ubsan/Makefile.am: Define new libsanitizer_ubsan.la library. * ubsan/Makefile.in: Regenerate. From-SVN: r262433
2018-07-04re PR sanitizer/84250 (Symbol collision when using both Address and ↵Maxim Ostapenko7-30/+65
Undefined Behavior sanitizers (-fsanitize=address,undefined)) gcc/ 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com> PR sanitizer/84250 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static libasan. * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan. libsanitizer/ 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com> PR sanitizer/84250 * Makefile.am: Reorder libs. * Makefile.in: Regenerate. * asan/Makefile.am: Define DCAN_SANITIZE_UB=1, add dependancy from libsanitizer_ubsan.la. * asan/Makefile.in: Regenerate. * ubsan/Makefile.am: Define new libsanitizer_ubsan.la library. * ubsan/Makefile.in: Regenerate. From-SVN: r262421
2018-06-13re PR sanitizer/86090 ([ASAN] ASAN does not properly configure libbacktrace.)Denis Khalikov4-2/+14
2018-06-13 Denis Khalikov <d.khalikov@partner.samsung.com> libsanitizer/ PR sanitizer/86090 * configure.ac: Check for lstat and readlink. * configure, config.h.in: Rebuild. From-SVN: r261564
2018-05-31re PR sanitizer/86012 (libsanitizer build failure on sparc64-linux-gnu)Matthias Klose2-1/+7
2018-05-31 Matthias Klose <doko@ubuntu.com> PR sanitizer/86012 * sanitizer_common/sanitizer_platform_limits_posix.cc: Define SIZEOF_STRUCT_USTAT for 32bit sparc. From-SVN: r260990
2018-05-24libsanitizer: Use pre-computed size of struct ustat for LinuxH.J. Lu2-2/+21
Cherry-pick compiler-rt revision 333213: <sys/ustat.h> has been removed from glibc 2.28 by: commit cf2478d53ad7071e84c724a986b56fe17f4f4ca7 Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> Date: Sun Mar 18 11:28:59 2018 +0800 Deprecate ustat syscall interface This patch uses pre-computed size of struct ustat for Linux. PR sanitizer/85835 * sanitizer_common/sanitizer_platform_limits_posix.cc: Don't include <sys/ustat.h> for Linux. (SIZEOF_STRUCT_USTAT): New. (struct_ustat_sz): Use SIZEOF_STRUCT_USTAT for Linux. From-SVN: r260684
2018-04-26If someone has access to a 64-bit mips-linux system to test this (with the ↵Hans-Peter Nilsson2-1/+10
obvious edit), that'd be really nice. If someone has access to a 64-bit mips-linux system to test this (with the obvious edit), that'd be really nice. Until then, best to not introduce possible build failures. * configure.tgt <mips*-*-linux*>: Enable build, excluding mips*64*-*-linux*. From-SVN: r259665
2018-04-26As mentioned in <http://gcc.gnu.org/ml/gcc/2018-03/msg00133.html> the bogus ↵Hans-Peter Nilsson3-3/+13
adjustment to 160 from 144 (which is reverted here)... As mentioned in <http://gcc.gnu.org/ml/gcc/2018-03/msg00133.html> the bogus adjustment to 160 from 144 (which is reverted here), is a single-token commit in upstream r301307, an attempt to correct a failed build due to an upstream change to compile the runtime with D_FILE_OFFSET_BITS=64. The correct fix is here: just use the right include. Yes, user-struct-stat64-as-stat is actually 160 for MIPS o32 and I hear user-struct-stat is also 160 for n32. There are additional fields appended for user-struct-stat! I guess for MIPS it's as bad as it gets for mixing up kernel and user struct stat. The context of the patch doesn't show that in the #else there's the correct include, the one for <asm/stat.h> to get the kernel-struct-stat. If you can't compile it, IMHO the kernel headers are just too old; 3.2 is fine for example. * sanitizer_common/sanitizer_platform_limits_linux.cc: Do not take the shortcut to #include <sys/stat.h> for MIPS instead of the kernel <asm/stat.h>. Explain why sys/stat.h is misleading or wrong to get the kernel struct stat. * sanitizer_common/sanitizer_platform_limits_posix.h [__mips__]: Correct the value for 32-bit non-android struct_kernel_stat_sz. From-SVN: r259664
2018-04-26This appears to be present in compiler-rt upstream, but as part of more ↵Hans-Peter Nilsson2-1/+6
intrusive changes. This appears to be present in compiler-rt upstream, but as part of more intrusive changes. For gcc, the lack of this results in a fatal warning (-Werror) at build-time. * sanitizer_common/sanitizer_atomic_clang_other.h [_MIPS_SIM && _MIPS_SIM == _ABIO32] (lock): Add initializer for .pad member. From-SVN: r259663