Commit Graph

121 Commits

Author SHA1 Message Date
Yury Gribov
666ee4d682 re PR sanitizer/59368 (libsanitizer spec file installed in the wrong place)
2013-12-05  Yury Gribov  <y.gribov@samsung.com>

	PR sanitizer/59368
	* Makefile.am (gcc_version): Added gcc_version.
	* Makefile.in: Regenerate.

From-SVN: r205698
2013-12-05 09:56:03 +00:00
Kostya Serebryany
df77f0e4ec libsanitizer merge from upstream r196090
From-SVN: r205695
2013-12-05 09:18:38 +00:00
Jakub Jelinek
35814b0346 re PR sanitizer/59063 (ASAN: segfault in __interceptor_clock_gettime)
gcc/
2013-11-29  Jakub Jelinek  <jakub@redhat.com>
            Yury Gribov  <y.gribov@samsung.com>

        PR sanitizer/59063
        * config/gnu-user.h: Removed old code for setting up sanitizer
        libs.
        * gcc.c: Using libsanitizer spec instead of explicit libs.

gcc/testsuite/
2013-11-29  Jakub Jelinek  <jakub@redhat.com>
            Yury Gribov  <y.gribov@samsung.com>

        PR sanitizer/59063
        * c-c++-common/asan/pr59063-1.c: New test.
        * c-c++-common/asan/pr59063-2.c: Likewise.
        * lib/asan-dg.exp: Add path to libsanitizer.spec to cflags.
        * lib/ubsan-dg.exp: Likewise.

libsanitizer/
2013-11-29  Jakub Jelinek  <jakub@redhat.com>
            Yury Gribov  <y.gribov@samsung.com>

        PR sanitizer/59063
        * libsanitizer.spec.in: Add spec file to hold link flags for
        various sanitizer libs.
        * configure.ac: Check whether clock_* routines come from librt.
        * asan/Makefile.am (libasan_la_LDFLAGS): Libs now come from
        configure.ac.
        * tsan/Makefile.am (libtsan_la_LDFLAGS): Likewise.
        * ubsan/Makefile.am (libubsan_la_LDFLAGS): Likewise.
        * lsan/Makefile.am (liblsan_la_LDFLAGS): Likewise.
        * asan/Makefile.in: Regenerate.
        * interception/Makefile.in: Regenerate.
        * lsan/Makefile.in: Regenerate.
        * sanitizer_common/Makefile.in: Regenerate.
        * tsan/Makefile.in: Regenerate.
        * ubsan/Makefile.in: Regenerate.
        * Makefile.in: Regenerate.
        * configure: Regenerate.


Co-Authored-By: Yury Gribov <y.gribov@samsung.com>

From-SVN: r205524
2013-11-29 12:30:36 +00:00
Jakub Jelinek
049558ed48 re PR sanitizer/59106 (Failure to link against static libasan)
2013-11-28  Jakub Jelinek  <jakub@redhat.com>
	    Yury Gribov  <y.gribov@samsung.com>

	PR sanitizer/59106
	* ubsan/Makefile.am (AM_CXXFLAGS): Disable -frtti for files that
	don't need it.
	* ubsan/Makefile.in: Regenerated.

Co-Authored-By: Yury Gribov <y.gribov@samsung.com>

From-SVN: r205482
2013-11-28 12:20:23 +00:00
Jakub Jelinek
9065ada9b5 re PR sanitizer/59061 (Port leaksanitizer)
PR sanitizer/59061
	* common.opt (static-liblsan): Add.
	* config/gnu-user.h (STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS):
	Define.
	* flag-types.h (enum sanitize_code): Add SANITIZE_LEAK.  Renumber
	SANITIZE_SHIFT, SANITIZE_DIVIDE, SANITIZE_UNREACHABLE, SANITIZE_VLA,
	SANITIZE_RETURN.
	* opts.c (common_handle_option): Handle -fsanitize=leak.
	* gcc.c (ADD_STATIC_LIBLSAN_LIBS, LIBLSAN_SPEC): Define.
	(LIBUBSAN_SPEC): Don't test LIBUBSAN_EARLY_SPEC.
	(LIBUBSAN_EARLY_SPEC): Remove.
	(SANITIZER_EARLY_SPEC): Don't do anything for libubsan.
	(SANITIZER_SPEC): Add -fsanitize=leak handling.
	(sanitize_spec_function): Handle %sanitize(leak).
	* doc/invoke.texi (-static-liblsan, -fsanitize=leak): Document.

	* c-c++-common/asan/no-redundant-instrumentation-7.c: Fix
	cleanup-tree-dump directive.

	* configure.tgt: Set LSAN_SUPPORTED=yes for x86_64-linux.
	* configure.ac (LSAN_SUPPORTED): New AM_CONDITIONAL.
	* configure: Regenerated.
	* lsan/Makefile.am (toolexeclib_LTLIBRARIES, lsan_files,
	liblsan_la_SOURCES, liblsan_la_LIBADD, liblsan_la_LDFLAGS): Add.
	* lsan/Makefile.in: Regenerated.

From-SVN: r205290
2013-11-22 22:13:08 +01:00
Mike Stump
486294d4ed sanitizer_linux.cc (__sanitizer): Grab one change from upstream to fix build.
* sanitizer_common/sanitizer_linux.cc (__sanitizer): Grab one
        change from upstream to fix build.

From-SVN: r205285
2013-11-22 20:33:06 +00:00
Yury Gribov
2621c86043 re PR sanitizer/59106 (Failure to link against static libasan)
libsanitizer:
2013-11-18  Yury Gribov  <y.gribov@samsung.com>

	PR sanitizer/59106
	* asan/Makefile.am (AM_CXXFLAGS): Add -fno-rtti.
	* interception/Makefile.am (AM_CXXFLAGS): Likewise.
	* lsan/Makefile.am (AM_CXXFLAGS): Likewise.
	* sanitizer_common/Makefile.am (AM_CXXFLAGS): Likewise.
	* tsan/Makefile.am (AM_CXXFLAGS): Likewise.
	* asan/Makefile.in: Regenerate.
	* interception/Makefile.in: Regenerate.
	* tsan/Makefile.in: Regenerate.
	* lsan/Makefile.in: Regenerate.
	* sanitizer_common/Makefile.in: Regenerate.

gcc/testsuite:
2013-11-18  Yury Gribov  <y.gribov@samsung.com>

	PR sanitizer/59106
	* c-c++-common/asan/pr59106.c: New test.

From-SVN: r204934
2013-11-18 08:03:16 +00:00
Kostya Serebryany
c8e1377bf9 fix PR sanitizer/58994
From-SVN: r204838
2013-11-15 10:31:14 +00:00
Peter Bergner
c3d77f3add re PR sanitizer/59009 (libsanitizer merge from upstream r191666 breaks bootstrap on powerpc64-linux and aarch64-linux)
PR sanitizer/59009
	* sanitizer_common/sanitizer_platform_limits_posix.cc: Temporarily
	ifdef out more source.

From-SVN: r204757
2013-11-13 16:34:33 -06:00
Jakub Jelinek
d00106f4f0 sanitizer_platform_limits_linux.cc: Temporarily ifdef out almost the whole source.
* sanitizer_common/sanitizer_platform_limits_linux.cc: Temporarily
	ifdef out almost the whole source.
	* sanitizer_common/sanitizer_common_syscalls.inc: Likewise.

From-SVN: r204726
2013-11-13 00:42:55 +01:00
H.J. Lu
e276866fd7 Check __x86_64__ for FPU state
PR sanitizer/59018
	* sanitizer_common/sanitizer_platform_limits_posix.cc
	(struct_user_fpxregs_struct_sz): Initialize to 0 if __x86_64__ is
	defined.

From-SVN: r204483
2013-11-06 13:52:29 -08:00
H.J. Lu
f5c36cfc4b Use 64-bit system types for x86-64
PR sanitizer/59018
	* sanitizer_common/sanitizer_platform_limits_linux.cc
	(struct_kernel_stat64_sz): Initialize to 0 if __x86_64__ is
	defined.
	* sanitizer_common/sanitizer_platform_limits_posix.h
	(__sanitizer_dirent): Use 64-bit d_ino/d_off if __x86_64__ is
	defined.
	(__sanitizer___kernel_uid_t): Typedef as unsigned if __x86_64__
	is defined.
	(__sanitizer___kernel_gid_t): Likewise.
	(__sanitizer___kernel_off_t): Typedef as long long if __x86_64__
	is defined.

From-SVN: r204482
2013-11-06 13:51:41 -08:00
H.J. Lu
e45de14ec7 Fix internal_clone for x32
PR sanitizer/59018
	* sanitizer_common/sanitizer_linux.cc (internal_clone): Allocate
	2 64-bit integers to save and restore fn and arg.  Properly load
	newtls/child_tidptr into r8/r10.

From-SVN: r204481
2013-11-06 13:50:42 -08:00
H.J. Lu
38693e39b6 Cast pointers to uptr for 64-bit syscalls
PR sanitizer/59018
	* sanitizer_common/sanitizer_linux.cc (internal_mmap,
	internal_munmap, internal_open, internal_read, internal_write,
	internal_stat, internal_lstat, internal_fstat, internal_readlink,
	internal_unlink, internal_execve, NanoTime, BlockingMutex::Lock,
	BlockingMutex::Unlock, internal_ptrace, internal_getdents,
	internal_sigaltstack): Cast pointers to uptr for 64-bit syscalls.

From-SVN: r204480
2013-11-06 13:49:36 -08:00
Kostya Serebryany
ef1b3fda32 libsanitizer merge from upstream r191666
This may break gcc-asan on Mac, will follow up separately.

From-SVN: r204368
2013-11-04 21:33:31 +00:00
Gerald Pfeifer
ecdbd01aa1 Fix up ChangeLog entries (name, e-mail, formatting, otherwise).
From-SVN: r203992
2013-10-23 21:30:54 +00:00
Alan Modra
3cbe17f7de libtool.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical ppc host match.
* libtool.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical
	ppc host match.  Support little-endian powerpc linux hosts.
Regenerate configure throughout.

From-SVN: r202773
2013-09-20 19:17:52 +09:30
Iain Sandoe
0cea211ebd darwin.h (LINK_COMMAND_SPEC_A): Revise sanitizer specs to include sanitize(undefined).
gcc:

        * config/darwin.h (LINK_COMMAND_SPEC_A): Revise sanitizer specs to
        include sanitize(undefined).

libsanitizer:

        * ubsan/Makefile.am (libubsan_la_LIBADD): Revise to omit
        libinterception.la for Darwin.
        * ubsan/Makefile.in: Regenerate.

From-SVN: r202144
2013-09-01 12:16:07 +00:00
Marek Polacek
de5a5fa139 Merge ubsan into trunk.
From-SVN: r202113
2013-08-30 16:12:58 +00:00
Christophe Lyon
634cfa2ba8 sanitizer_linux.cc (MemoryMappingLayout::Next): Cherry pick upstream r182922.
2013-06-03  Christophe Lyon  <christophe.lyon@linaro.org>

       * sanitizer_common/sanitizer_linux.cc (MemoryMappingLayout::Next):
       Cherry pick upstream r182922.

From-SVN: r199606
2013-06-03 15:04:35 +02:00
Christophe Lyon
8a5800b82f arm.c (arm_asan_shadow_offset): New function.
2013-05-06  Christophe Lyon  <christophe.lyon@linaro.org>

	gcc/
	* config/arm/arm.c (arm_asan_shadow_offset): New function.
	(TARGET_ASAN_SHADOW_OFFSET): Define.
	* config/arm/linux-eabi.h (ASAN_CC1_SPEC): Define.
	(LINUX_OR_ANDROID_CC): Add ASAN_CC1_SPEC.

	libsanitizer/
	* configure.tgt: Add ARM pattern.

	testsuite/
	* lib/target-supports.exp (check_effective_target_hw): New
	function.
	* c-c++-common/asan/clone-test-1.c: Call
	check_effective_target_hw.
	* c-c++-common/asan/rlimit-mmap-test-1.c: Likewise.
	* c-c++-common/asan/heap-overflow-1.c: Update regexps to accept
	possible decorations.
	* c-c++-common/asan/null-deref-1.c: Likewise.
	* c-c++-common/asan/stack-overflow-1.c: Likewise.
	* c-c++-common/asan/strncpy-overflow-1.c: Likewise.
	* c-c++-common/asan/use-after-free-1.c: Likewise.
	* g++.dg/asan/deep-thread-stack-1.C: Likewise.
	* g++.dg/asan/large-func-test-1.C: Likewise.

From-SVN: r198683
2013-05-07 16:17:50 +02:00
Jakub Jelinek
a745e44403 Fix up ChangeLog entry date.
From-SVN: r196965
2013-03-22 15:17:24 +01:00
Jakub Jelinek
1868beeeca re PR other/43620 ([4.3 Release Blocker] Uploading to gnu.org will fail due to automake security issue)
PR other/43620
	* configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
	* Makefile.in: Regenerated.
	* asan/Makefile.in: Regenerated.
	* interception/Makefile.in: Regenerated.
	* sanitizer_common/Makefile.in: Regenerated.
	* tsan/Makefile.in: Regenerated.

From-SVN: r196964
2013-03-22 15:14:42 +01:00
Jakub Jelinek
4c37612689 asan_mapping.h (kMidMemEnd): Increase to 0x4fffffffffULL.
* asan/asan_mapping.h (kMidMemEnd): Increase to 0x4fffffffffULL.
	* asan/asan_rtl.cc (__asan_init): Increase kMidMemEnd to
	0x4fffffffffULL.

From-SVN: r196355
2013-02-28 20:55:40 +01:00
Jakub Jelinek
7d61373544 re PR sanitizer/56393 (SIGSEGV when -fsanitize=address and dynamic lib with global objects)
PR sanitizer/56393
	* config/gnu-user.h (LIBASAN_EARLY_SPEC): Link in libasan_preinit.o
	if not linking a shared library.

	* lib/asan-dg.exp (asan_link_flags): Add
	-B${gccpath}/libsanitizer/asan/ to flags.

	* asan/Makefile.am (nodist_toolexeclib_HEADERS): Set to
	libasan_preinit.o.
	(libasan_preinit.o): Depend on asan_preinit.o.
	* asan/Makefile.in: Regenerated.
	* asan/asan_preinit.cc: New file, synced from upstream.
	* asan/asan_rtl.cc: Remove preinit stuff, synced from upstream.

From-SVN: r196222
2013-02-22 17:07:36 +01:00
Jack Howarth
304886c59c Makefile.am (libasan_la_SOURCES): Remove deprecated dynamic/asan_interceptors_dynamic.cc.
* asan/Makefile.am (libasan_la_SOURCES): Remove deprecated
	dynamic/asan_interceptors_dynamic.cc.
	* asan/Makefile.in: Regenerated.
	* merge.sh: Remove merge of deprecated lib/asan/dynamic.

From-SVN: r196211
2013-02-21 20:12:43 +01:00
Jakub Jelinek
4be7da26b5 asan_rtl.cc (__asan_preinit): Don't add if PIC macro is defined.
* asan/asan_rtl.cc (__asan_preinit): Don't add if PIC macro is
	defined.  Add used attribute.

From-SVN: r196205
2013-02-21 15:25:32 +01:00
Kostya Serebryany
7df59255e1 libsanitizer merge from upstream r175733
From-SVN: r196201
2013-02-21 10:57:10 +00:00
H.J. Lu
8afd2ed720 OFF_T: Merged from upstream r175140
PR bootstrap/56327
	* interception/interception.h (OFF_T): Merged from upstream
	r175140.

From-SVN: r196054
2013-02-14 08:54:01 -08:00
Jakub Jelinek
6422242b91 i386.c (ix86_asan_shadow_offset): Revert last change.
* config/i386/i386.c (ix86_asan_shadow_offset): Revert last change.

	* asan/asan_mapping.h (SHADOW_OFFSET): Set to (1ULL << 44) on x86-64.

From-SVN: r196017
2013-02-13 17:06:43 +01:00
Kostya Serebryany
b4ab7d34f5 libsanitizer merge from upstream r175049
From-SVN: r196009
2013-02-13 10:46:01 +00:00
Jack Howarth
34dc17ed31 configure.tgt: Disable build on darwin9 and earlier.
2013-02-11  Jack Howarth  <howarth@bromo.med.uc.edu>

	    * configure.tgt: Disable build on darwin9 and earlier.

From-SVN: r195958
2013-02-11 23:13:37 +00:00
Kostya Serebryany
2660d12d0a libsanitizer merge from upstream r173241
From-SVN: r195404
2013-01-23 11:41:33 +00:00
Jakub Jelinek
19006c45f5 Makefile.am (AM_CXXFLAGS): Remove -Wno-c99-extensions.
* sanitizer_common/Makefile.am (AM_CXXFLAGS): Remove
	-Wno-c99-extensions.
	* interception/Makefile.am (AM_CXXFLAGS): Likewise.
	* asan/Makefile.am (AM_CXXFLAGS): Likewise.
	* sanitizer_common/Makefile.in: Regenerated.
	* interception/Makefile.in: Regenerated.
	* asan/Makefile.in: Regenerated.

From-SVN: r195229
2013-01-16 08:34:49 +01:00
Wei Mi
edadb734f6 re PR sanitizer/55488 (Implement cold calls in tsan run-time)
2013-01-10  Wei Mi  <wmi@google.com>

libsanitizer/
        PR sanitizer/55488
        * tsan/Makefile.am: Add tsan_rtl_amd64.S.
        * tsan/Makefile.in: Regenerated.
        * tsan/tsan_rtl.h: Enable HACKY_CALL.

From-SVN: r195092
2013-01-10 17:57:34 +00:00
Kostya Serebryany
e9772e16b3 libsanitizer mege from upstream r171973
From-SVN: r195083
2013-01-10 12:44:08 +00:00
H.J. Lu
7f7162cf57 Remove "-I" from LIBSTDCXX_RAW_CXX_LDFLAGS
config/

	* libstdc++-raw-cxx.m4 (GCC_LIBSTDCXX_RAW_CXX_FLAGS): Remove
	"-I" from LIBSTDCXX_RAW_CXX_LDFLAGS.

libjava/

	* Makefile.am (lib_gnu_awt_xlib_la_LDFLAGS): Replace
	LIBSTDCXX_RAW_CXX_LDLAGS with LIBSTDCXX_RAW_CXX_LDFLAGS.
	* Makefile.in: Regenerated.

libsanitizer/

	* asan/Makefile.am (libasan_la_LIBADD): Replace
	LIBSTDCXX_RAW_CXX_LDLAGS with LIBSTDCXX_RAW_CXX_LDFLAGS.
	* tsan/Makefile.am (libtsan_la_LIBADD): Likewise.
	* Makefile.in: Regenerated.
	* configure: Likewise.
	* asan/Makefile.in: Likewise.
	* interception/Makefile.in: Likewise.
	* sanitizer_common/Makefile.in: Likewise.
	* tsan/Makefile.in: Likewise.

From-SVN: r194989
2013-01-07 10:23:42 -08:00
H.J. Lu
b488a2c757 Restore AM_MAKEFLAGS in libsanitizer
* Makefile.am (AM_MAKEFLAGS): Restored.
	* asan/Makefile.am: Likewise.
	* interception/Makefile.am: Likewise.
	* sanitizer_common/Makefile.am: Likewise.
	* tsan/Makefile.am: Likewise.
	* Makefile.in: Regenerated.
	* asan/Makefile.in: Likewise.
	* interception/Makefile.in: Likewise.
	* sanitizer_common/Makefile.in: Likewise.
	* tsan/Makefile.in: Likewise.

From-SVN: r194452
2012-12-12 07:41:36 -08:00
H.J. Lu
e8adb21b9a Restore MAKEOVERRIDES in libsanitizer
* Makefile.am (MAKEOVERRIDES): Restored.
	* asan/Makefile.am: Likewise.
	* interception/Makefile.am: Likewise.
	* sanitizer_common/Makefile.am: Likewise.
	* tsan/Makefile.am: Likewise.
	* Makefile.in: Regenerated.
	* asan/Makefile.in: Likewise.
	* interception/Makefile.in: Likewise.
	* sanitizer_common/Makefile.in: Likewise.
	* tsan/Makefile.in: Likewise.

From-SVN: r194450
2012-12-12 06:36:27 -08:00
H.J. Lu
e1e953d9d5 Use libstdc++-raw-cxx.m4 in libjava
config/

	* libstdc++-raw-cxx.m4 (GCC_LIBSTDCXX_RAW_CXX_FLAGS): Also
	AC_SUBST LIBSTDCXX_RAW_CXX_LDFLAGS.

libjava/

	* Makefile.am (lib_gnu_awt_xlib_la_CPPFLAGS): Use
	$(LIBSTDCXX_RAW_CXX_CXXLAGS).
	(lib_gnu_awt_xlib_la_LDFLAGS): Use $(LIBSTDCXX_RAW_CXX_LDLAGS).
	* configure.ac (GCC_LIBSTDCXX_RAW_CXX_FLAGS): New.
	* aclocal.m4: Regenerated.
	* Makefile.in:Likewise.
	* configure: Likewise.

libsanitizer/

	* asan/Makefile.am (libasan_la_LIBADD): Use $(LIBSTDCXX_RAW_CXX_LDLAGS).
	* tsan/Makefile.am (libtsan_la_LIBADD): Likewise.
	* Makefile.in: Regenerated.
	* configure: Likewise.
	* asan/Makefile.in: Likewise.
	* interception/Makefile.in: Likewise.
	* sanitizer_common/Makefile.in: Likewise.
	* tsan/Makefile.in: Likewise.

From-SVN: r194448
2012-12-12 05:40:15 -08:00
H.J. Lu
a62d3903d9 Remove AM_MAKEFLAGS/MAKEOVERRIDES from libsanitizer
* Makefile.am (AM_MAKEFLAGS): Removed.
	(MAKEOVERRIDES): Likewise.
	* asan/Makefile.am: Likewise.
	* interception/Makefile.am: Likewise.
	* sanitizer_common/Makefile.am: Likewise.
	* tsan/Makefile.am: Likewise.
	* Makefile.in: Regenerated.
	* asan/Makefile.in: Likewise.
	* interception/Makefile.in: Likewise.
	* sanitizer_common/Makefile.in: Likewise.
	* tsan/Makefile.in: Likewise.

From-SVN: r194447
2012-12-12 05:36:47 -08:00
H.J. Lu
d10a2df271 Add libstdc++-raw-cxx.m4 and use it in libsanitizer
config/

	PR sanitizer/55533
	* libstdc++-raw-cxx.m4: New file.

libsanitizer/

	PR sanitizer/55533
	* Makefile.am (AM_MAKEFLAGS): Remove CC and CXX.
	* configure.ac (GCC_LIBSTDCXX_RAW_CXX_FLAGS): New.
	* asan/Makefile.am (AM_CXXFLAGS): Add $(LIBSTDCXX_RAW_CXX_CXXFLAGS).
	(AM_MAKEFLAGS): Remove CC and CXX.
	* interception/Makefile.am: Likewise.
	* sanitizer_common/Makefile.am: Likewise.
	* tsan/Makefile.am: Likewise.
	* Makefile.in: Regenerated.
	* aclocal.m4: Likewise.
	* configure: Likewise.
	* asan/Makefile.in: Likewise.
	* interception/Makefile.in: Likewise.
	* sanitizer_common/Makefile.in: Likewise.
	* tsan/Makefile.in: Likewise.

From-SVN: r194424
2012-12-11 13:32:11 -08:00
Peter Bergner
957fee09af configure.tgt: Enable build on powerpc*-linux.
libsanitizer/
	* configure.tgt: Enable build on powerpc*-linux.

gcc/
	* config/rs6000/sysv4.h (TARGET_ASAN_SHADOW_OFFSET): Define.
	* config/rs6000/rs6000.c (rs6000_asan_shadow_offset): New function.
	* config/rs6000/rs6000.h (FRAME_GROWS_DOWNWARD): Disable if using ASAN.

From-SVN: r194273
2012-12-06 15:53:36 -06:00
Jack Howarth
3157880f53 Fix PR55599/sanitizer by disabling static libasan on darwin
From-SVN: r194257
2012-12-06 14:49:44 +00:00
Kostya Serebryany
695edbac5c [libsanitizer] merge from upstream r169392
From-SVN: r194255
2012-12-06 14:43:11 +00:00
Kostya Serebryany
a040845458 [libsanitizer] merge from upstream r169371
From-SVN: r194221
2012-12-05 13:19:55 +00:00
Jakub Jelinek
41d37c5656 Fix up two ChangeLog entries.
From-SVN: r194132
2012-12-04 14:18:54 +01:00
Kostya Serebryany
8c4d267c6e [libsanitizer] Fix PR55521 by switching libsanitizer from mach_override to mac interpose functions on darwin
From-SVN: r194120
2012-12-04 07:00:35 +00:00
H.J. Lu
a23ed040bb Don't use -I for libstdc++-v3 header files
* Makefile.am (AM_MAKEFLAGS): Restore CC and CXX.
	* configure.ac (ACX_NONCANONICAL_TARGET): Removed.
	* asan/Makefile.am (AM_CXXFLAGS): Remove -I for libstdc++-v3 header
	files.
	(AM_MAKEFLAGS): Restore CC and CXX.
	* interception/Makefile.am: Likewise.
	* sanitizer_common/Makefile.am: Likewise.
	* tsan/Makefile.am: Likewise.
	* Makefile.in: Regenerated.
	* aclocal.m4: Likewise.
	* configure: Likewise.
	* asan/Makefile.in: Likewise.
	* interception/Makefile.in: Likewise.
	* sanitizer_common/Makefile.in: Likewise.
	* tsan/Makefile.in: Likewise.

From-SVN: r193951
2012-11-29 11:15:43 -08:00
H.J. Lu
2ed685b8fb Use explicit -I for libstdc++-v3 header files
* Makefile.am (AM_MAKEFLAGS): Remove CC and CXX.
	* configure.ac (ACX_NONCANONICAL_TARGET): New.
	* asan/Makefile.am (AM_CXXFLAGS): Add -I for libstdc++-v3 header
	files.
	(AM_MAKEFLAGS): Remove CC and CXX.
	* interception/Makefile.am: Likewise.
	* sanitizer_common/Makefile.am: Likewise.
	* tsan/Makefile.am: Likewise.
	* Makefile.in: Regenerated.
	* aclocal.m4: Likewise.
	* configure: Likewise.
	* asan/Makefile.in: Likewise.
	* interception/Makefile.in: Likewise.
	* sanitizer_common/Makefile.in: Likewise.
	* tsan/Makefile.in: Likewise.

From-SVN: r193949
2012-11-29 11:01:17 -08:00
Kostya Serebryany
4ba5ca4650 [libsanitizer] merge from upstream r168699
From-SVN: r193849
2012-11-27 14:01:46 +00:00
Jack Howarth
f246eadc0a [libsanitizer] add mach_override and enable libsanitizer on darwin
From-SVN: r193781
2012-11-24 18:24:13 +00:00
H.J. Lu
9cb5411c17 Set gcc_version in tsan/Makefile.am
PR sanitizer/55450
	* tsan/Makefile.am (gcc_version): New.
	* tsan/Makefile.in: Regenerated.

From-SVN: r193767
2012-11-23 13:14:05 -08:00
Kostya Serebryany
e297eb600d [libsanitizer] merge from upstream r168514
From-SVN: r193756
2012-11-23 14:46:25 +00:00
Kostya Serebryany
3409d40e47 [libsanitizer] a script to help merging asan/tsan from upstream
From-SVN: r193743
2012-11-23 04:09:17 +00:00
Jakub Jelinek
64548f3b79 Makefile.am (AM_CXXFLAGS): Remove -Wno-variadic-macros.
* tsan/Makefile.am (AM_CXXFLAGS): Remove -Wno-variadic-macros.
	* Makefile.am (SUBDIRS): Guard tsan addition with TSAN_SUPPORTED
	automake conditional instead of !MULTISUBDIR32.
	* configure.tgt: Set TSAN_SUPPORTED=yes for x86_64/i686-linux
	for 64-bit multilib.
	* configure.ac: Check for void * size, source in configure.tgt,
	define TSAN_SUPPORTED conditional instead of MULTILIBDIR32.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
	* tsan/Makefile.in: Regenerated.

From-SVN: r193741
2012-11-23 01:31:54 +01:00
Wei Mi
cd0be65c26 tsan: New directory.
libsanitizer/
	* tsan: New directory. Import tsan runtime from llvm.
	* configure.ac: Add 64 bits tsan build.
	* Makefile.am: Likewise.
	* configure: Regenerated.
	* Makefile.in: Likewise.

From-SVN: r193737
2012-11-22 22:03:11 +00:00
Kostya Serebryany
5cba83a8a7 extend libsanitizer/README.gcc
From-SVN: r193698
2012-11-21 15:07:31 +00:00
Konstantin Serebryany
b014e124e4 Fix sanitizer build on sparc64.
* sanitizer_common/sanitizer_linux.cc
	(SANITIZER_LINUX_USES_64BIT_SYSCALLS): Define.
	(internal_mmap): Use it.
	(internal_filesize): Likewise.

From-SVN: r193676
2012-11-20 12:54:49 -08:00
Tom Tromey
2b723e217a configure.ac: Invoke AM_MAINTAINER_MODE.
* configure.ac: Invoke AM_MAINTAINER_MODE.
	* aclocal.m4, configure, Makefile.in, asan/Makefile.in,
	interception/Makefile.in, sanitizer_common/Makefile.in: Rebuild.

From-SVN: r193561
2012-11-16 15:19:15 +00:00
H.J. Lu
d1caed1484 Define/use hardware pointer type for stack unwind
PR other/55333
	* include/sanitizer/common_interface_defs.h (uhwptr): New type
	for hardware pointer.
	* sanitizer_common/sanitizer_stacktrace.cc (StackTrace::FastUnwindStack):
	Replace uptr with uhwptr for stack unwind.

From-SVN: r193557
2012-11-16 04:02:29 -08:00
Dodji Seketeli
f3754998dd Enable building of libsanitizer on sparc linux
libsanitizer/ChangeLog:

	* configure.tgt: Enable sparc linux.

From-SVN: r193552
2012-11-16 09:11:03 +01:00
H.J. Lu
f64bcb29f5 Properly set MULTISUBDIR and gcc_version
* configure.ac: Properly set MULTISUBDIR.
	* asan/Makefile.am (gcc_version): New.
	* interception/Makefile.am (gcc_version): Likewise.
	* sanitizer_common/Makefile.am (gcc_version): Likewise.
	* configure: Regenerated.
	* asan/Makefile.in: Likewise.
	* interception/Makefile.in: Likewise.
	* sanitizer_common/Makefile.in: Likewise.

From-SVN: r193534
2012-11-15 08:00:47 -08:00
H.J. Lu
2a6346c406 Add support for multilib run-time libraries
PR other/55291
	* configure.ac (--enable-version-specific-runtime-libs): New option.
	(AC_CANONICAL_SYSTEM): New.
	(AM_ENABLE_MULTILIB): Moved right after AM_INIT_AUTOMAKE.
	(toolexecdir): Support multilib.
	(toolexeclibdir): Likewise.
	(multilib_arg): New.
	* Makefile.in: Regenerated.
	* aclocal.m4: Likewise.
	* configure: Likewise.
	* asan/Makefile.in: Likewise.
	* interception/Makefile.in: Likewise.
	* sanitizer_common/Makefile.in: Likewise.

From-SVN: r193516
2012-11-14 16:03:37 -08:00
H.J. Lu
4a56a7be3d Check __x86_64__ instead of __WORDSIZE
PR other/55292
	Backport from upstream revision 167883
	* sanitizer_common/sanitizer_linux.cc (internal_mmap): Check
	__x86_64__ instead of __WORDSIZE.
	(internal_filesize): Likwise.

From-SVN: r193500
2012-11-14 05:45:56 -08:00
H.J. Lu
4053ca2c6f Don't set AC_CONFIG_AUX_DIR
* configure.ac (AC_CONFIG_AUX_DIR): Removed.
	* Makefile.in: Regenerated.
	* configure: Likewise.

From-SVN: r193499
2012-11-14 04:21:28 -08:00
H.J. Lu
9d10e4f5fd Rename libsanitizer/ChangeLog.asan to libsanitizer/ChangeLog
From-SVN: r193498
2012-11-14 03:41:10 -08:00
H.J. Lu
a2479b3dd0 Update configure.ac for GCC tree and remove unused files
PR other/55304
	* acinclude.m4: New file.
	* Makefile.am (ACLOCAL_AMFLAGS): New.
	* configure.ac (AC_PREREQ): Set to 2.64.
	(AC_CONFIG_AUX_DIR): Set to "..".
	* Makefile.in: Regenerated.
	* aclocal.m4: Likewise.
	* configure: Likewise.
	* asan/Makefile.in: Likewise.
	* interception/Makefile.in: Likewise.
	* sanitizer_common/Makefile.in: Likewise.

	* config.guess: Removed.
	* config.sub: Likewise.
	* depcomp: Likewise.
	* install-sh: Likewise.
	* ltmain.sh: Likewise.
	* missing: Likewise.

From-SVN: r193491
2012-11-13 16:02:12 -08:00
Richard Henderson
93bf539055 Move libsanitizer configure logic to subdirectory
From-SVN: r193487
2012-11-13 14:19:44 -08:00
David S. Miller
d2860e7236 Get sparc building again after ASAN merge.
libsanitizer/

	* asan/asan_linux.cc (GetPcSpBp): Add sparc support.

From-SVN: r193468
2012-11-12 22:53:23 -08:00
Wei Mi
f35db108b9 Import the asan runtime library into GCC tree
This patch imports the runtime library in the GCC tree, ensures that
-lasan is passed to the linker when -faddress-sanitizer is used and
sets up the build system accordingly.

ChangeLog:

	* configure.ac: Add libsanitizer to target_libraries.
	* Makefile.def: Ditto.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* libsanitizer: New directory for asan runtime.  Contains an empty
	tsan directory.

gcc/ChangeLog:

	* gcc.c (LINK_COMMAND_SPEC): Add -laddress-sanitizer to link
	command if -faddress-sanitizer is on.

libsanitizer:

	Initial checkin: migrate asan runtime from llvm.

From-SVN: r193441
2012-11-12 16:53:47 +01:00