gcc/libsanitizer
Jakub Jelinek c9b39a4955 re PR sanitizer/80998 (Implement -fsanitize=pointer-overflow)
PR sanitizer/80998
	* sanopt.c (pass_sanopt::execute): Handle IFN_UBSAN_PTR.
	* tree-ssa-alias.c (call_may_clobber_ref_p_1): Likewise.
	* flag-types.h (enum sanitize_code): Add SANITIZER_POINTER_OVERFLOW.
	Or it into SANITIZER_UNDEFINED.
	* ubsan.c: Include gimple-fold.h and varasm.h.
	(ubsan_expand_ptr_ifn): New function.
	(instrument_pointer_overflow): New function.
	(maybe_instrument_pointer_overflow): New function.
	(instrument_object_size): Formatting fix.
	(pass_ubsan::execute): Call instrument_pointer_overflow
	and maybe_instrument_pointer_overflow.
	* internal-fn.c (expand_UBSAN_PTR): New function.
	* ubsan.h (ubsan_expand_ptr_ifn): Declare.
	* sanitizer.def (__ubsan_handle_pointer_overflow,
	__ubsan_handle_pointer_overflow_abort): New builtins.
	* tree-ssa-tail-merge.c (merge_stmts_p): Handle IFN_UBSAN_PTR.
	* internal-fn.def (UBSAN_PTR): New internal function.
	* opts.c (sanitizer_opts): Add pointer-overflow.
	* lto-streamer-in.c (input_function): Handle IFN_UBSAN_PTR.
	* fold-const.c (build_range_check): Compute pointer range check in
	integral type if pointer arithmetics would be needed.  Formatting
	fixes.
gcc/testsuite/
	* c-c++-common/ubsan/ptr-overflow-1.c: New test.
	* c-c++-common/ubsan/ptr-overflow-2.c: New test.
libsanitizer/
	* ubsan/ubsan_handlers.cc: Cherry-pick upstream r304461.
	* ubsan/ubsan_checks.inc: Likewise.
	* ubsan/ubsan_handlers.h: Likewise.

From-SVN: r250656
2017-07-28 12:37:51 +02:00
..
asan re PR other/79046 (g++ -print-file-name=plugin uses full version number in path) 2017-01-21 09:47:11 +01:00
builtins
include
interception re PR other/79046 (g++ -print-file-name=plugin uses full version number in path) 2017-01-21 09:47:11 +01:00
libbacktrace re PR other/79046 (g++ -print-file-name=plugin uses full version number in path) 2017-01-17 10:38:48 +01:00
lsan re PR other/79046 (g++ -print-file-name=plugin uses full version number in path) 2017-01-21 09:47:11 +01:00
sanitizer_common re PR sanitizer/81066 (sanitizer_stoptheworld_linux_libcdep.cc:276:22: error: aggregate ‘sigaltstack handler_stack’ has incomplete type and cannot be defined) 2017-07-14 11:10:45 +02:00
tsan re PR sanitizer/81066 (sanitizer_stoptheworld_linux_libcdep.cc:276:22: error: aggregate ‘sigaltstack handler_stack’ has incomplete type and cannot be defined) 2017-07-14 11:10:45 +02:00
ubsan re PR sanitizer/80998 (Implement -fsanitize=pointer-overflow) 2017-07-28 12:37:51 +02:00
ChangeLog re PR sanitizer/80998 (Implement -fsanitize=pointer-overflow) 2017-07-28 12:37:51 +02:00
HOWTO_MERGE re PR sanitizer/78307 (missing symbols in libubsan without changing the soname) 2016-11-16 13:13:19 +02:00
LICENSE.TXT
LOCAL_PATCHES Add PR sanitizer/78532 patch to libsanitizer/LOCAL_PATCHES. 2016-11-30 14:32:55 +02:00
MERGE
Makefile.am re PR other/79046 (g++ -print-file-name=plugin uses full version number in path) 2017-01-17 10:38:48 +01:00
Makefile.in re PR other/79046 (g++ -print-file-name=plugin uses full version number in path) 2017-01-17 10:38:48 +01:00
README.gcc
acinclude.m4
aclocal.m4
config.h.in
configure re PR other/79046 (g++ -print-file-name=plugin uses full version number in path) 2017-01-17 10:38:48 +01:00
configure.ac re PR other/79046 (g++ -print-file-name=plugin uses full version number in path) 2017-01-17 10:38:48 +01:00
configure.tgt re PR sanitizer/79341 (Many Asan tests fail on s390) 2017-02-11 00:34:49 +01:00
libsanitizer.spec.in
libtool-version
merge.sh re PR sanitizer/79168 (libtsan fails to link when cross compiling GCC tip for Aarch64 target) 2017-01-24 01:18:36 +01: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.