[Bug sanitizer/105084] ASAN false positive on global-buffer-overflow

2022-03-29 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105084 Richard Biener changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED

[Bug sanitizer/105084] ASAN false positive on global-buffer-overflow

2022-03-28 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105084 --- Comment #3 from Li Shaohua --- Thanks a lot for your explanation. That makes sense to me :).

[Bug sanitizer/105084] ASAN false positive on global-buffer-overflow

2022-03-28 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105084 --- Comment #2 from Jakub Jelinek --- Neither is false positive, both are real bugs in your test programs. The fact that on the second testcase a violation isn't reported at -O0 and is at -O2 depends on the ordering of the global variables (we e

[Bug sanitizer/105084] ASAN false positive on global-buffer-overflow

2022-03-28 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105084 --- Comment #1 from Li Shaohua --- Sorry, the triggering program should be the following: $cat a.c int a[] = {3}; int b = 7; main() { unsigned int *c = &b; *c = a[-1]; }