diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-11-09 16:37:28 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-11-09 16:37:28 +0100 |
commit | 2e955d50a928eac736c1e4a6eddc932d3400200a (patch) | |
tree | 03880b28e03c433d65f4c40b64eec608dd81fdb0 /gcc/flag-types.h | |
parent | 14e7281244ddf777d822f1e99518f0e15b0bfea6 (diff) | |
download | gcc-2e955d50a928eac736c1e4a6eddc932d3400200a.zip gcc-2e955d50a928eac736c1e4a6eddc932d3400200a.tar.gz gcc-2e955d50a928eac736c1e4a6eddc932d3400200a.tar.bz2 |
flag-types.h (enum sanitize_code): Add SANITIZE_SHIFT_BASE and SANITIZE_SHIFT_EXPONENT...
* flag-types.h (enum sanitize_code): Add SANITIZE_SHIFT_BASE
and SANITIZE_SHIFT_EXPONENT, change SANITIZE_SHIFT to bitwise
or of them, renumber other enumerators.
* opts.c (sanitizer_opts): Add shift-base and shift-exponent.
* doc/invoke.texi: Document -fsanitize=shift-base and
-fsanitize-shift-exponent, document -fsanitize=shift as
having those 2 suboptions.
c-family/
* c-ubsan.c (ubsan_instrument_shift): Handle split
-fsanitize=shift-base and -fsanitize=shift-exponent.
testsuite/
* gcc.dg/ubsan/c99-shift-3.c: New test.
* gcc.dg/ubsan/c99-shift-4.c: New test.
* gcc.dg/ubsan/c99-shift-5.c: New test.
* gcc.dg/ubsan/c99-shift-6.c: New test.
From-SVN: r242005
Diffstat (limited to 'gcc/flag-types.h')
-rw-r--r-- | gcc/flag-types.h | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/gcc/flag-types.h b/gcc/flag-types.h index 816df6b..6c5a4cc 100644 --- a/gcc/flag-types.h +++ b/gcc/flag-types.h @@ -211,24 +211,26 @@ enum sanitize_code { /* LeakSanitizer. */ SANITIZE_LEAK = 1UL << 4, /* UndefinedBehaviorSanitizer. */ - SANITIZE_SHIFT = 1UL << 5, - SANITIZE_DIVIDE = 1UL << 6, - SANITIZE_UNREACHABLE = 1UL << 7, - SANITIZE_VLA = 1UL << 8, - SANITIZE_NULL = 1UL << 9, - SANITIZE_RETURN = 1UL << 10, - SANITIZE_SI_OVERFLOW = 1UL << 11, - SANITIZE_BOOL = 1UL << 12, - SANITIZE_ENUM = 1UL << 13, - SANITIZE_FLOAT_DIVIDE = 1UL << 14, - SANITIZE_FLOAT_CAST = 1UL << 15, - SANITIZE_BOUNDS = 1UL << 16, - SANITIZE_ALIGNMENT = 1UL << 17, - SANITIZE_NONNULL_ATTRIBUTE = 1UL << 18, - SANITIZE_RETURNS_NONNULL_ATTRIBUTE = 1UL << 19, - SANITIZE_OBJECT_SIZE = 1UL << 20, - SANITIZE_VPTR = 1UL << 21, - SANITIZE_BOUNDS_STRICT = 1UL << 22, + SANITIZE_SHIFT_BASE = 1UL << 5, + SANITIZE_SHIFT_EXPONENT = 1UL << 6, + SANITIZE_DIVIDE = 1UL << 7, + SANITIZE_UNREACHABLE = 1UL << 8, + SANITIZE_VLA = 1UL << 9, + SANITIZE_NULL = 1UL << 10, + SANITIZE_RETURN = 1UL << 11, + SANITIZE_SI_OVERFLOW = 1UL << 12, + SANITIZE_BOOL = 1UL << 13, + SANITIZE_ENUM = 1UL << 14, + SANITIZE_FLOAT_DIVIDE = 1UL << 15, + SANITIZE_FLOAT_CAST = 1UL << 16, + SANITIZE_BOUNDS = 1UL << 17, + SANITIZE_ALIGNMENT = 1UL << 18, + SANITIZE_NONNULL_ATTRIBUTE = 1UL << 19, + SANITIZE_RETURNS_NONNULL_ATTRIBUTE = 1UL << 20, + SANITIZE_OBJECT_SIZE = 1UL << 21, + SANITIZE_VPTR = 1UL << 22, + SANITIZE_BOUNDS_STRICT = 1UL << 23, + SANITIZE_SHIFT = SANITIZE_SHIFT_BASE | SANITIZE_SHIFT_EXPONENT, SANITIZE_UNDEFINED = SANITIZE_SHIFT | SANITIZE_DIVIDE | SANITIZE_UNREACHABLE | SANITIZE_VLA | SANITIZE_NULL | SANITIZE_RETURN | SANITIZE_SI_OVERFLOW | SANITIZE_BOOL | SANITIZE_ENUM |