diff options
author | Ilya Enkovich <ilya.enkovich@intel.com> | 2015-03-12 09:23:06 +0000 |
---|---|---|
committer | Ilya Enkovich <ienkovich@gcc.gnu.org> | 2015-03-12 09:23:06 +0000 |
commit | 1b89b8f062f42c782ca528be2a8239019141947f (patch) | |
tree | ced77f7e2063c39a4653f20b8429318a159f6480 /gcc | |
parent | 90d33d8fc9acffe8c9a17674e93632c9b420a203 (diff) | |
download | gcc-1b89b8f062f42c782ca528be2a8239019141947f.zip gcc-1b89b8f062f42c782ca528be2a8239019141947f.tar.gz gcc-1b89b8f062f42c782ca528be2a8239019141947f.tar.bz2 |
re PR target/65044 (ICE: SIGSEGV in contains_struct_check with -fsanitize=address -fcheck-pointer-bounds)
gcc/
PR target/65044
* toplev.c (process_options): Restrict Pointer Bounds Checker
usage with Address Sanitizer.
gcc/testsuite/
PR target/65044
* gcc.target/i386/pr65044.c: New.
From-SVN: r221379
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr65044.c | 12 | ||||
-rw-r--r-- | gcc/toplev.c | 12 |
4 files changed, 34 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e800af1..3a91320 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-03-12 Ilya Enkovich <ilya.enkovich@intel.com> + + PR target/65044 + * toplev.c (process_options): Restrict Pointer Bounds Checker + usage with Address Sanitizer. + 2015-03-12 Richard Biener <rguenther@suse.de> * tree-cfg.c (gimple_split_block): Remove loop finding stmt diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 04c01f2..485a3f8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-03-12 Ilya Enkovich <ilya.enkovich@intel.com> + + PR target/65044 + * gcc.target/i386/pr65044.c: New. + 2015-03-12 Tom de Vries <tom@codesourcery.com> PR rtl-optimization/64895 diff --git a/gcc/testsuite/gcc.target/i386/pr65044.c b/gcc/testsuite/gcc.target/i386/pr65044.c new file mode 100644 index 0000000..4f318d6 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr65044.c @@ -0,0 +1,12 @@ +/* { dg-error "-fcheck-pointer-bounds is not supported with Address Sanitizer" } */ +/* { dg-do compile } */ +/* { dg-require-effective-target mpx } */ +/* { dg-options "-fcheck-pointer-bounds -mmpx -fsanitize=address" } */ + +extern int x[]; + +void +foo () +{ + x[0] = 0; +} diff --git a/gcc/toplev.c b/gcc/toplev.c index 99cf180..b06eed3 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1375,7 +1375,17 @@ process_options (void) if (flag_check_pointer_bounds) { if (targetm.chkp_bound_mode () == VOIDmode) - error ("-fcheck-pointer-bounds is not supported for this target"); + { + error ("-fcheck-pointer-bounds is not supported for this target"); + flag_check_pointer_bounds = 0; + } + + if (flag_sanitize & SANITIZE_ADDRESS) + { + error ("-fcheck-pointer-bounds is not supported with " + "Address Sanitizer"); + flag_check_pointer_bounds = 0; + } } /* One region RA really helps to decrease the code size. */ |