From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13784 invoked by alias); 21 Sep 2015 20:21:28 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36582 Received: (qmail 10345 invoked from network); 21 Sep 2015 20:21:27 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Originating-IP: [80.3.228.158] X-Spam: 0 X-Authority: v=2.1 cv=MJad45tl c=1 sm=1 tr=0 a=P+FLVI8RzFchTbbqTxIDRw==:117 a=P+FLVI8RzFchTbbqTxIDRw==:17 a=NLZqzBF-AAAA:8 a=kj9zAlcOel0A:10 a=bz_Jd_yqvk4wb9invf4A:9 a=CjuIK1q_8ugA:10 Date: Mon, 21 Sep 2015 21:21:13 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: Two issues found with -fsanitize=undefined Message-ID: <20150921212113.74706d86@ntlworld.com> In-Reply-To: <20150921200413.GA8913@x4> References: <20150917075759.GA24365@x4> <20150921201306.0017146b@ntlworld.com> <20150921200413.GA8913@x4> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 21 Sep 2015 22:04:13 +0200 Markus Trippelsdorf 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"); pws