[Bug sanitizer/60861] out of bounds access of global var in .rodata/.bss not detected

2014-04-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60861 --- Comment #7 from Jakub Jelinek --- I'd say it is fine for test to be optimized to 1 at -O2, but am not sure we want to do that even for -O0 (and if we disable it for -O0, whether we want it for -Og). Then it will be user's choice whether he wa

[Bug sanitizer/60861] out of bounds access of global var in .rodata/.bss not detected

2014-04-17 Thread kcc at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60861 Kostya Serebryany changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug sanitizer/60861] out of bounds access of global var in .rodata/.bss not detected

2014-04-16 Thread y.gribov at samsung dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60861 --- Comment #5 from Yury Gribov --- (In reply to Andrew Pinski from comment #4) > (In reply to Yury Gribov from comment #3) > > I can reproduce this in trunk. Looks like Asan pass works correctly but gcc > > reduces test() to 'return 1;' very earl

[Bug sanitizer/60861] out of bounds access of global var in .rodata/.bss not detected

2014-04-16 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60861 --- Comment #4 from Andrew Pinski --- (In reply to Yury Gribov from comment #3) > I can reproduce this in trunk. Looks like Asan pass works correctly but gcc > reduces test() to 'return 1;' very early for some reason. I'll debug further. Most lik

[Bug sanitizer/60861] out of bounds access of global var in .rodata/.bss not detected

2014-04-16 Thread y.gribov at samsung dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60861 Yury Gribov changed: What|Removed |Added CC||y.gribov at samsung dot com --- Comment #3

[Bug sanitizer/60861] out of bounds access of global var in .rodata/.bss not detected

2014-04-16 Thread jan.sm...@alcatel-lucent.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60861 --- Comment #2 from Jan Smets --- Using -fno-common (while compiling as C), or compiling as C++ works for the unitialized bss example: int testGlobalOutOfBoundsRODATAVar[5]; /* bss : works with -fno-common (compiled as C) or when compiled as C+

[Bug sanitizer/60861] out of bounds access of global var in .rodata/.bss not detected

2014-04-16 Thread kcc at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60861 --- Comment #1 from Kostya Serebryany --- Will adding "-fno-common" help? Or building the test as C++? See https://code.google.com/p/address-sanitizer/wiki/Flags