This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug sanitizer/70717] New: -fsanitize=object-size as warning
- From: "aleks at physik dot tu-berlin.de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 18 Apr 2016 19:59:31 +0000
- Subject: [Bug sanitizer/70717] New: -fsanitize=object-size as warning
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70717
Bug ID: 70717
Summary: -fsanitize=object-size as warning
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: sanitizer
Assignee: unassigned at gcc dot gnu.org
Reporter: aleks at physik dot tu-berlin.de
CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
jakub at gcc dot gnu.org, kcc at gcc dot gnu.org
Target Milestone: ---
a new warning could detect problems earlier than "-fsanitize=object-size".
The following code is wrong, should be detected by "-fsanitize=object-size",
but it could be detected already at compile-time, especially for
memset/memcpy/memcmp .
char a[8], b[16]; memcpy(a,b,sizeof(b)); // write out of bounds, a[8..15] does
not exist
Thanks for reading