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

2014-04-17 Thread y.gribov at samsung dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60861 --- Comment #5 from Yury Gribov y.gribov at samsung dot com --- (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()

[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 kcc at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[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 jakub at gcc dot gnu.org --- 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

[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 kcc at gcc dot gnu.org --- Will adding -fno-common help? Or building the test as C++? See https://code.google.com/p/address-sanitizer/wiki/Flags

[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 jan.sm...@alcatel-lucent.com --- 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

[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 y.gribov at samsung dot com changed: What|Removed |Added CC||y.gribov at

[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 pinskia at gcc dot gnu.org --- (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