diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-12-17 20:10:39 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-12-17 20:10:39 +0100 |
commit | 8ccaace8355c45a0b4602c2a666d4d5318fdc707 (patch) | |
tree | 407a3a12d4ecccfc9625b2c66a274b6e86f30f6a /gcc/testsuite/gcc.dg/asan | |
parent | 63ac625170fb144df1c58c0475a5ac8c60005ea1 (diff) | |
download | gcc-8ccaace8355c45a0b4602c2a666d4d5318fdc707.zip gcc-8ccaace8355c45a0b4602c2a666d4d5318fdc707.tar.gz gcc-8ccaace8355c45a0b4602c2a666d4d5318fdc707.tar.bz2 |
re PR sanitizer/78832 (-fcompare-debug failure (length) with -fsanitize=address)
PR sanitizer/78832
* sanopt.c (sanitize_asan_mark_unpoison): Remove next variable, use
continue if gsi_next should be skipped.
(sanitize_asan_mark_poison): Remove prev variable, use continue if
gsi_prev should be skipped. When removing ASAN_MARK, do gsi_prev
first and gsi_remove on a previously made copy of the iterator.
* gcc.dg/asan/pr78832.c: New test.
From-SVN: r243777
Diffstat (limited to 'gcc/testsuite/gcc.dg/asan')
-rw-r--r-- | gcc/testsuite/gcc.dg/asan/pr78832.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/asan/pr78832.c b/gcc/testsuite/gcc.dg/asan/pr78832.c new file mode 100644 index 0000000..deed8f1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/asan/pr78832.c @@ -0,0 +1,22 @@ +/* PR sanitizer/78832 */ +/* { dg-do compile } */ +/* { dg-additional-options "-fcompare-debug" } */ + +void bar (int *); + +int +foo (int x) +{ + int *f = 0; + if (x) + goto lab; + { + int y, z; + bar (&y); + int *d = &y; + bar (&z); + int *e = &z; + } + f = &x; + lab: return 6; +} |