From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22931 invoked by alias); 19 Sep 2015 20:18:23 -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: 36561 Received: (qmail 7142 invoked from network); 19 Sep 2015 20:18:19 -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,T_DKIM_INVALID autolearn=ham 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=IJ5UqdYxAKBvoZUnwp1v45HR7j xCc/ROXW9MapAmTUo=; b=j4Axsmeq/aa/Rl8fdLkxXV73n1yJEPOAJEVJbgo4GH j0Sy7DcgGu9uf364yL8BcXI/dKWwaPZlvSFNt58uU1fOXMsZRA5rwijB957NRnu3 BAIsjUIti4Atk0OSl8cughHU7xouGxH1R+oDeCXsWLAUgFPSIeSL6MCbwVGAUhg4 E= Date: Sat, 19 Sep 2015 22:18:14 +0200 From: Markus Trippelsdorf To: Peter Stephenson Cc: zsh-workers@zsh.org Subject: Re: Two issues found with -fsanitize=undefined Message-ID: <20150919201814.GA409@x4> References: <20150917075759.GA24365@x4> <20150919205751.5338bddc@ntlworld.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150919205751.5338bddc@ntlworld.com> On 2015.09.19 at 20:57 +0100, Peter Stephenson wrote: > On Thu, 17 Sep 2015 09:57:59 +0200 > Markus Trippelsdorf wrote: > > 1) > > pattern.c:2645:12: runtime error: signed integer overflow: 1234567890123456789 * 10 cannot be represented in type 'long int' > > Test ./D02glob.ztst failed: error output differs from expected as shown above for: > > This might shut the compiler up, although the existing code should do > the right thing anyway. I don't have gcc 5. Thanks. It fixes one issue. And please note that all issues reported by running the instrumented shell, build with -fsanitize=undefined, are _real_ undefined behavior bugs. So this is not about shutting the compiler up, but making sure that undefined behavior isn't invoked anymore. BTW clang's -fsanitize=undefined report these additional cases during D02glob.ztst: ./D02glob.ztst: starting. exec.c:2240:6: runtime error: index 8 out of bounds for type 'int [8]' exec.c:2048:10: runtime error: index 8 out of bounds for type 'int [8]' exec.c:2122:7: runtime error: index 8 out of bounds for type 'int [8]' -- Markus