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. Marek