Commit Graph

23 Commits

Author SHA1 Message Date
Max Ostapenko
696d846a56 libsanitizer merge from upstream r250806.
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-10-21 10:32:45 +03:00
Yury Gribov
d041a6fcae re PR sanitizer/64839 (libsanitizer shouldn't require <rpc/xdr.h>)
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-04-13 08:59:55 +00:00
Uros Bizjak
7f201a67fb Makefile.am (AM_CXXFLAGS): Use -std=gnu++11.
* 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-14 15:23:51 +01:00
Kostya Serebryany
c5be964a42 libsanitizer merge from upstream r221802
From-SVN: r217518
2014-11-13 20:41:38 +00:00
Kostya Serebryany
866e32ad33 [libsanitizer merge from upstream r218156]
From-SVN: r215527
2014-09-23 17:59:53 +00:00
Kostya Serebryany
dee5ea7a0b libsanitizer merge from upstream r209283
From-SVN: r210743
2014-05-22 07:09:21 +00:00
Jakub Jelinek
b5f58ba331 * sanitizer_common/sanitizer_symbolizer_libbacktrace.h
(LibbacktraceSymbolizer::Demangle): New declaration.
	* sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
	(POSIXSymbolizer::Demangle): Use libbacktrace_symbolizer_'s Demangle
	method if possible.
	* sanitizer_common/sanitizer_symbolizer_libbacktrace.cc: Include
	"demangle.h" if SANITIZE_CP_DEMANGLE is defined.
	(struct CplusV3DemangleData): New type.
	(CplusV3DemangleCallback, CplusV3Demangle): New functions.
	(SymbolizeCodePCInfoCallback, SymbolizeCodeCallback,
	SymbolizeDataCallback): Use CplusV3Demangle.
	* sanitizer_common/Makefile.am (AM_CXXFLAGS): Add
	-DSANITIZE_CP_DEMANGLE and -I $(top_srcdir)/../include.
	* libbacktrace/backtrace-rename.h (cplus_demangle_builtin_types,
	cplus_demangle_fill_ctor, cplus_demangle_fill_dtor,
	cplus_demangle_fill_extended_operator, cplus_demangle_fill_name,
	cplus_demangle_init_info, cplus_demangle_mangled_name,
	cplus_demangle_operators, cplus_demangle_print,
	cplus_demangle_print_callback, cplus_demangle_type, cplus_demangle_v3,
	cplus_demangle_v3_callback, is_gnu_v3_mangled_ctor,
	is_gnu_v3_mangled_dtor, java_demangle_v3, java_demangle_v3_callback):
	Define.
	(__asan_internal_memcmp, __asan_internal_strncmp): New prototypes.
	(memcmp, strncmp): Redefine.
	* libbacktrace/Makefile.am (libsanitizer_libbacktrace_la_SOURCES): Add
	../../libiberty/cp-demangle.c.
	* libbacktrace/bridge.cc (__asan_internal_memcmp,
	__asan_internal_strncmp): New functions.
	* sanitizer_common/Makefile.in: Regenerated.
	* libbacktrace/Makefile.in: Regenerated.
	* configure: Regenerated.
	* configure.ac: Regenerated.
	* config.h.in: Regenerated.

From-SVN: r206477
2014-01-09 19:16:40 +01:00
Jakub Jelinek
2613419a70 Makefile.am (AM_CPPFLAGS): Add -isystem $(top_srcdir)/include/system.
* sanitizer_common/Makefile.am (AM_CPPFLAGS): Add
	-isystem $(top_srcdir)/include/system.
	* sanitizer_common/Makefile.in: Regenerated.
	* include/system/linux/aio_abi.h: New header.
	* include/system/linux/mroute.h: New header.
	* include/system/linux/mroute6.h: New header.
	* include/system/linux/perf_event.h: New header.
	* include/system/linux/types.h: New header.

From-SVN: r206476
2014-01-09 19:15:41 +01:00
Jakub Jelinek
c915a58145 re PR sanitizer/59136 (llvm-symbolizer shouldn't be started always)
PR sanitizer/59136
libsanitizer/
	* sanitizer_common/Makefile.am (AM_CXXFLAGS): If
	LIBBACKTRACE_SUPPORTED add -DSANITIZER_LIBBACKTRACE
	and -I/-include flags.
	* lsan/Makefile.am (liblsan_la_LIBADD): Add
	libsanitizer_libbacktrace.la if LIBBACKTRACE_SUPPORTED.
	* tsan/Makefile.am (libtsan_la_LIBADD): Likewise.
	* ubsan/Makefile.am (libubsan_la_LIBADD): Likewise.
	* asan/Makefile.am (libasan_la_LIBADD): Likewise.
	* Makefile.am (SUBDIRS): If LIBBACKTRACE_SUPPORTED add
	libbacktrace.
	* README.gcc: Document that also lsan and ubsan are
	maintained in compiler-rt upstream.
	* libbacktrace/Makefile.am: New file.
	* libbacktrace/backtrace-rename.h: New file.
	* libbacktrace/backtrace-supported.h.in: New file.
	* libbacktrace/bridge.cc: New file.
	* configure.ac: Add tests needed for libbacktrace build
	within libsanitizer.
	* sanitizer_common/Makefile.in: Regenerated.
	* lsan/Makefile.in: Regenerated.
	* tsan/Makefile.in: Regenerated.
	* ubsan/Makefile.in: Regenerated.
	* libbacktrace/Makefile.in: Generated.
	* config.h.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
	* interception/Makefile.in: Regenerated.
	* asan/Makefile.in: Regenerated.
	* aclocal.m4: Regenerated.
testsuite/
	* c-c++-common/asan/strip-path-prefix-1.c: Allow also the
	filename:line instead of (modulename+offset) form with stripped
	initial / from the filename.

From-SVN: r206475
2014-01-09 19:13:39 +01:00
Kostya Serebryany
df77f0e4ec libsanitizer merge from upstream r196090
From-SVN: r205695
2013-12-05 09:18:38 +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
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
Kostya Serebryany
7df59255e1 libsanitizer merge from upstream r175733
From-SVN: r196201
2013-02-21 10:57:10 +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
Kostya Serebryany
e9772e16b3 libsanitizer mege from upstream r171973
From-SVN: r195083
2013-01-10 12:44:08 +00: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
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
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
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
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