This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug sanitizer/80797] -fsanitize=null doesn't instrument &s->x
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 18 May 2017 07:25:25 +0000
- Subject: [Bug sanitizer/80797] -fsanitize=null doesn't instrument &s->x
- Auto-submitted: auto-generated
- References: <bug-80797-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80797
--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to Vittorio Zecca from comment #4)
> I applied your patch to version 8 trunk 247930 and it seems to work,
> but on your example I get
>
> ubsan-1.c:10:8: runtime error: member access within null pointer of type
> 'struct S'
> ubsan-1.c:11:8: runtime error: member access within null pointer of type
> 'struct S'
Thanks for testing.
> pointing at column 8 to v and v2.
> Shouldn't they point to s or i?
Yeah, they should.