diff options
author | Marek Polacek <mpolacek@gcc.gnu.org> | 2015-05-07 08:08:57 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2015-05-07 08:08:57 +0000 |
commit | e0f0d3b9d210c7962d8186403b87c0b08c19b8ff (patch) | |
tree | ef62eceb38bcfbb26bb1550dda4f456ae31db72e /gcc/opts.c | |
parent | ad2c39af63eecbca99b3b316bb4147d0a0a0fe0a (diff) | |
download | gcc-e0f0d3b9d210c7962d8186403b87c0b08c19b8ff.zip gcc-e0f0d3b9d210c7962d8186403b87c0b08c19b8ff.tar.gz gcc-e0f0d3b9d210c7962d8186403b87c0b08c19b8ff.tar.bz2 |
c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting flexible member array-like members if...
* c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
flexible member array-like members if SANITIZE_BOUNDS_STRICT.
* doc/invoke.texi: Document -fsanitize=bounds-strict.
* flag-types.h (enum sanitize_code): Add SANITIZE_BOUNDS_STRICT, or it
into SANITIZE_NONDEFAULT.
* opts.c (common_handle_option): Handle -fsanitize=bounds-strict.
* c-c++-common/ubsan/bounds-10.c: New test.
From-SVN: r222871
Diffstat (limited to 'gcc/opts.c')
-rw-r--r-- | gcc/opts.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1584,6 +1584,8 @@ common_handle_option (struct gcc_options *opts, { "float-cast-overflow", SANITIZE_FLOAT_CAST, sizeof "float-cast-overflow" - 1 }, { "bounds", SANITIZE_BOUNDS, sizeof "bounds" - 1 }, + { "bounds-strict", SANITIZE_BOUNDS | SANITIZE_BOUNDS_STRICT, + sizeof "bounds-strict" - 1 }, { "alignment", SANITIZE_ALIGNMENT, sizeof "alignment" - 1 }, { "nonnull-attribute", SANITIZE_NONNULL_ATTRIBUTE, sizeof "nonnull-attribute" - 1 }, |