gcc/libsanitizer
Marek Polacek 85a16bf8b5 builtins.def: Change SANITIZE_FLOAT_DIVIDE to SANITIZE_NONDEFAULT.
* builtins.def: Change SANITIZE_FLOAT_DIVIDE to SANITIZE_NONDEFAULT.
	* gcc.c (sanitize_spec_function): Likewise.
	* convert.c (convert_to_integer): Include "ubsan.h".  Add
	floating-point to integer instrumentation.
	* doc/invoke.texi: Document -fsanitize=float-cast-overflow.
	* flag-types.h (enum sanitize_code): Add SANITIZE_FLOAT_CAST and
	SANITIZE_NONDEFAULT.
	* opts.c (common_handle_option): Handle -fsanitize=float-cast-overflow.
	* sanitizer.def (BUILT_IN_UBSAN_HANDLE_FLOAT_CAST_OVERFLOW,
	BUILT_IN_UBSAN_HANDLE_FLOAT_CAST_OVERFLOW_ABORT): Add.
	* ubsan.c: Include "realmpfr.h" and "dfp.h".
	(get_ubsan_type_info_for_type): Handle REAL_TYPEs.
	(ubsan_type_descriptor): Set tkind to 0xffff for types other than
	float/double/long double.
	(ubsan_instrument_float_cast): New function.
	* ubsan.h (ubsan_instrument_float_cast): Declare.
testsuite/
	* c-c++-common/ubsan/float-cast-overflow-1.c: New test.
	* c-c++-common/ubsan/float-cast-overflow-10.c: New test.
	* c-c++-common/ubsan/float-cast-overflow-2.c: New test.
	* c-c++-common/ubsan/float-cast-overflow-3.c: New test.
	* c-c++-common/ubsan/float-cast-overflow-4.c: New test.
	* c-c++-common/ubsan/float-cast-overflow-5.c: New test.
	* c-c++-common/ubsan/float-cast-overflow-6.c: New test.
	* c-c++-common/ubsan/float-cast-overflow-7.c: New test.
	* c-c++-common/ubsan/float-cast-overflow-7.h: New file.
	* c-c++-common/ubsan/float-cast-overflow-8.c: New test.
	* c-c++-common/ubsan/float-cast-overflow-9.c: New test.
	* c-c++-common/ubsan/float-cast.h: New file.
	* g++.dg/ubsan/float-cast-overflow-bf.C: New test.
	* gcc.dg/ubsan/float-cast-overflow-bf.c: New test.
libsanitizer/
	* ubsan/ubsan_value.cc (getFloatValue): Handle 96-bit
	floating-point types.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r210862
2014-05-23 14:44:42 +00:00
..
asan libsanitizer merge from upstream r209283 2014-05-22 07:09:21 +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 libsanitizer merge from upstream r209283 2014-05-22 07:09:21 +00:00
tsan libsanitizer merge from upstream r209283 2014-05-22 07:09:21 +00:00
ubsan builtins.def: Change SANITIZE_FLOAT_DIVIDE to SANITIZE_NONDEFAULT. 2014-05-23 14:44:42 +00:00
ChangeLog builtins.def: Change SANITIZE_FLOAT_DIVIDE to SANITIZE_NONDEFAULT. 2014-05-23 14:44:42 +00: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.