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
acinclude.m4
aclocal.m4
ChangeLog builtins.def: Change SANITIZE_FLOAT_DIVIDE to SANITIZE_NONDEFAULT. 2014-05-23 14:44:42 +00:00
config.h.in
configure
configure.ac
configure.tgt configure.tgt: Unsupported for little endian PowerPC for now. 2014-03-03 20:36:56 +00:00
libsanitizer.spec.in
libtool-version
LICENSE.TXT
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
MERGE libsanitizer merge from upstream r209283 2014-05-22 07:09:21 +00:00
merge.sh
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.