gcc/libsanitizer
Jakub Jelinek 126edc3fe2 flag-types.h (enum sanitize_code): Add SANITIZE_NONNULL_ATTRIBUTE and 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-09-10 11:23:16 +02:00
..
asan asan_linux.cc: Cherry pick upstream r210012. 2014-06-11 11:35:48 +00:00
include libsanitizer merge from upstream r209283 2014-05-22 07:09:21 +00:00
interception libsanitizer merge from upstream r209283 2014-05-22 07:09:21 +00:00
libbacktrace Handle backtrace_qsort 2014-03-07 13:55:54 +00:00
lsan libsanitizer merge from upstream r209283 2014-05-22 07:09:21 +00:00
sanitizer_common sanitizer_common_interceptors.inc: Cherry pick upstream r211008. 2014-06-23 19:03:07 +00:00
tsan sanitizer_stacktrace.cc: Cherry pick upstream r209879. 2014-05-30 15:48:22 +02:00
ubsan flag-types.h (enum sanitize_code): Add SANITIZE_NONNULL_ATTRIBUTE and SANITIZE_RETURNS_NONNULL_ATTRIBUTE... 2014-09-10 11:23:16 +02:00
ChangeLog flag-types.h (enum sanitize_code): Add SANITIZE_NONNULL_ATTRIBUTE and SANITIZE_RETURNS_NONNULL_ATTRIBUTE... 2014-09-10 11:23:16 +02:00
LICENSE.TXT Import the asan runtime library into GCC tree 2012-11-12 16:53:47 +01:00
MERGE libsanitizer merge from upstream r209283 2014-05-22 07:09:21 +00:00
Makefile.am re PR sanitizer/61100 (asan/tsan should have the sanitizer includes) 2014-05-14 08:33:45 +00:00
Makefile.in re PR sanitizer/61100 (asan/tsan should have the sanitizer includes) 2014-05-14 08:33:45 +00:00
README.gcc re PR sanitizer/59136 (llvm-symbolizer shouldn't be started always) 2014-01-09 19:13:39 +01:00
acinclude.m4 Update configure.ac for GCC tree and remove unused files 2012-11-13 16:02:12 -08:00
aclocal.m4 re PR sanitizer/59136 (llvm-symbolizer shouldn't be started always) 2014-01-09 19:13:39 +01:00
config.h.in * sanitizer_common/sanitizer_symbolizer_libbacktrace.h 2014-01-09 19:16:40 +01:00
configure re PR sanitizer/57316 (build failure in libsanitizer) 2014-01-23 14:32:05 +00:00
configure.ac re PR sanitizer/57316 (build failure in libsanitizer) 2014-01-23 14:32:05 +00:00
configure.tgt configure.tgt: Unsupported for little endian PowerPC for now. 2014-03-03 20:36:56 +00:00
libsanitizer.spec.in re PR sanitizer/59063 (ASAN: segfault in __interceptor_clock_gettime) 2013-11-29 12:30:36 +00:00
libtool-version Import the asan runtime library into GCC tree 2012-11-12 16:53:47 +01:00
merge.sh libsanitizer merge from upstream r196489 2013-12-05 10:28:59 +00:00

README.gcc

AddressSanitizer (http://code.google.com/p/address-sanitizer) and
ThreadSanitizer (http://code.google.com/p/thread-sanitizer/) are
projects initially developed by Google Inc.
Both tools consist of a compiler module and a run-time library.
The sources of the run-time library for these projects are hosted at
http://llvm.org/svn/llvm-project/compiler-rt in the following directories:
  include/sanitizer
  lib/sanitizer_common
  lib/interception
  lib/asan
  lib/tsan
  lib/lsan
  lib/ubsan

Trivial and urgent fixes (portability, build fixes, etc.) may go directly to the
GCC tree.  All non-trivial changes, functionality improvements, etc. should go
through the upstream tree first and then be merged back to the GCC tree.
The merges from upstream should be done with the aid of the merge.sh script;
it will also update the file MERGE to contain the upstream revision
we merged with.