Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Two issues found with -fsanitize=undefined



On 2015.09.21 at 20:13 +0100, Peter Stephenson wrote:
> On Thu, 17 Sep 2015 09:57:59 +0200
> Markus Trippelsdorf <markus@xxxxxxxxxxxxxxx> wrote:
> > 2)
> >  compmatch.c:341:6: runtime error: null pointer passed as argument 2, which is declared to never be null}
> > Test ./Y02compmatch.ztst failed: output differs from expected as shown above for:
> 
> This might be benign, if the final argument is also zero; this should
> tell us.

Yes:
matchbuflen: (null) with no matchbuf: 0

It looks like the issue doesn't happen with a -DDEBUG build.
I've changed the DPUTS line to:
 fprintf(stderr, "matchbuflen: %s with no matchbuf: %x", matchbuf, matchbuflen);

-- 
Markus



Messages sorted by: Reverse Date, Date, Thread, Author