This is the mail archive of the
mailing list for the GCC project.
Re: GCC 4.9.2 -O3 gives a seg fault / GCC 4.8.2 -O3 works
- From: Marek Polacek <polacek at redhat dot com>
- To: Paul Smith <paul at mad-scientist dot net>
- Cc: Jakub Jelinek <jakub at redhat dot com>, gcc at gcc dot gnu dot org
- Date: Tue, 6 Jan 2015 17:37:02 +0100
- Subject: Re: GCC 4.9.2 -O3 gives a seg fault / GCC 4.8.2 -O3 works
- Authentication-results: sourceware.org; auth=none
- References: <1420532328 dot 7095 dot 263 dot camel at homebase> <20150106084350 dot GE1667 at tucnak dot redhat dot com> <1420561732 dot 3646 dot 33 dot camel at mad-scientist dot net>
On Tue, Jan 06, 2015 at 11:28:52AM -0500, Paul Smith wrote:
> On Tue, 2015-01-06 at 09:43 +0100, Jakub Jelinek wrote:
> > GCC trunk -fsanitize=undefined (in particular
> > -fsanitize=nonnull-attribute)
> > diagnoses it:
> > /tmp/mystring.cpp:103:26: runtime error: null pointer passed as
> > argument 2, which is declared to never be null
> Unfortunately adding -fsanitize=undefined in GCC 4.9.2 doesn't notice
> this (in fact it actually causes the segfault to go away).
> I can try to build a trunk version for this test, I suppose.
Right: -fsanitize=nonnull-attribute is a GCC 5 only thing.