From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15205 invoked by alias); 17 Sep 2015 17:24:41 -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: 36549 Received: (qmail 7742 invoked from network); 17 Sep 2015 17:24:39 -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=0.1 required=5.0 tests=BAYES_00,LONGWORDS, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 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=OonjFKUV8g9VNl8cRQP8Qlo1fs Awe3hMQaDxFPpoAEk=; b=SyUD1VwIpsVFjN1Jf5tT+bHARFtipCQUtmvtJs5InT RQCt6tNAYUOVlw2Gl7xwztua+SloLLmbz04oLUAtmx36UKgjKtQpyxF0neM9b2Gh EekJx8EivjDI1SzkfqswxPpKXqF+R82ujJrFkVZdYSXocwPVr5vVV+Dnm4U723Fv A= Date: Thu, 17 Sep 2015 19:24:33 +0200 From: Markus Trippelsdorf To: Bart Schaefer Cc: zsh-workers@zsh.org Subject: Re: Two issues found with -fsanitize=undefined Message-ID: <20150917172433.GA431@x4> References: <20150917075759.GA24365@x4> <150917101633.ZM10051@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <150917101633.ZM10051@torch.brasslantern.com> On 2015.09.17 at 10:16 -0700, Bart Schaefer wrote: > On Sep 17, 9:57am, Markus Trippelsdorf wrote: > } > } I've build zsh trunk with -fsanitize=undefined and two issue popped up > } while running the testsuite: > > It would be helpful if you included at least part of the output (after the > "for:") to indicate WHICH tests reported these errors. > > } 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: > > Could be anything. The error indicates that "matchbuf" is NULL at the > point where we expect to copy it into a new buffer, but if there is a > deeper reason why that is unexpectedly NULL it would be better to fix > that than to simply skip the copy. Sorry: ./Y02compmatch.ztst: starting. *** /tmp/zsh.ztst.out.27917 Thu Sep 17 19:20:46 2015 --- /tmp/zsh.ztst.tout.27917 Thu Sep 17 19:20:46 2015 *************** *** 1,3 **** line: {tst nolistbeep }{} ! COMPADD:{} INSERT_POSITIONS:{14} --- 1,3 ---- line: {tst nolistbeep }{} ! COMPADD:{compmatch.c:341:6: runtime error: null pointer passed as argument 2, which is declared to never be null} INSERT_POSITIONS:{14} Test ./Y02compmatch.ztst failed: output differs from expected as shown above for: example1_list=( kshoptionprint shglob listambiguous shinstdin listbeep shnullcmd listpacked shoptionletters listrowsfirst shortloops listtypes shwordsplit ) options_matcher='L:|[nN][oO]= M:_= M:{A-Z}={a-z}' test_code $options_matcher example1_list comptest $'tst nolistbee\t' Was testing: Documentation example for options, input "nolistbee" ./Y02compmatch.ztst: test failed. And it is quite easy to reproduce (with gcc-5): zsh-code % ./.preconfig zsh-code % CC="gcc -fsanitize=undefined" ./configure zsh-code % make && make check BTW why isn't the make -j option passed on? e.g. "make -j4" still builds single threaded. -- Markus