Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Two issues found with -fsanitize=undefined
- X-seq: zsh-workers 36583
- From: Markus Trippelsdorf <markus@xxxxxxxxxxxxxxx>
- To: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- Subject: Re: Two issues found with -fsanitize=undefined
- Date: Mon, 21 Sep 2015 22:34:09 +0200
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=simple; d=mail.ud10.udmedia.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=beta; bh=/CoiNZ8/BZGfE9SILEruFygUkT 5DnIwsKPjHe9s5+s0=; b=JtjqxvhNg3L1WGqC44wQ3da8xEPn7SGm1UnIxaVJ6x HX+Br7iY9xKUGu5JpaORoyDqNcBPN/hW+/cKf15vfKBjERVal5Pbu50AWwSVZ2S+ NZzKHWFmweYv4rnX/3GsFABi9UalywzF+e92qpx55tI26Zd9zwd/MrvhuX4bdZCK M=
- In-reply-to: <20150921212113.74706d86@ntlworld.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20150917075759.GA24365@x4> <20150921201306.0017146b@ntlworld.com> <20150921200413.GA8913@x4> <20150921212113.74706d86@ntlworld.com>
On 2015.09.21 at 21:21 +0100, Peter Stephenson wrote:
> On Mon, 21 Sep 2015 22:04:13 +0200
> Markus Trippelsdorf <markus@xxxxxxxxxxxxxxx> wrote:
> > 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);
>
> That's fine. If matchbuf is NULL, matchbuflen *should* be 0.
>
> I presume you're missing that
>
> DPUTS(matchbuflen, "matchbuflen with no matchbuf");
>
> is (roughly) equivalent to
>
> if (matchbuflen)
> fprintf(stderr, "matchbuflen with no matcbuf");
Well, only if DEBUG is defined. And as I wrote above the issue doesn't
happen at all for -DDEBUG.
--
Markus
Messages sorted by:
Reverse Date,
Date,
Thread,
Author