]> git.ipfire.org Git - thirdparty/gcc.git/commit - libsanitizer/ChangeLog
builtins.def: Change SANITIZE_FLOAT_DIVIDE to SANITIZE_NONDEFAULT.
authorMarek Polacek <polacek@redhat.com>
Fri, 23 May 2014 14:44:42 +0000 (14:44 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 23 May 2014 14:44:42 +0000 (14:44 +0000)
commit85a16bf8b55c7accb3b2f60568cd9119d9656494
tree76c97d7e36a0b8b32edf3400c6c2d38538e33618
parentfee9ba422f9193fb5e560bd430d7b14c55c128d1
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
27 files changed:
gcc/ChangeLog
gcc/builtins.def
gcc/convert.c
gcc/doc/invoke.texi
gcc/flag-types.h
gcc/gcc.c
gcc/opts.c
gcc/sanitizer.def
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-1.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-10.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-2.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-3.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-4.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-5.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-6.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-7.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-7.h [new file with mode: 0644]
gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-8.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-9.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/ubsan/float-cast.h [new file with mode: 0644]
gcc/testsuite/g++.dg/ubsan/float-cast-overflow-bf.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/ubsan/float-cast-overflow-bf.c [new file with mode: 0644]
gcc/ubsan.c
gcc/ubsan.h
libsanitizer/ChangeLog
libsanitizer/ubsan/ubsan_value.cc