From owner-freebsd-toolchain@FreeBSD.ORG Sun Mar 22 21:33:01 2015 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5EE0E3; Sun, 22 Mar 2015 21:33:01 +0000 (UTC) Received: from mail-lb0-x231.google.com (mail-lb0-x231.google.com [IPv6:2a00:1450:4010:c04::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5FBF6A72; Sun, 22 Mar 2015 21:33:01 +0000 (UTC) Received: by lbbrr9 with SMTP id rr9so42186406lbb.0; Sun, 22 Mar 2015 14:32:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Gx3r0ha82yDviFrhVbvVDE+vg24lBDCrOmqdvrxIflw=; b=mTs5DGfm1LNQCkdnCH+QwTlZnOMfENUsdwKDJcCudhT1yeqHBsqJtAiVnO7JvanEal BMzxsvS4N4NArnTvS02Ursk8mEC0CrD97GwJcbvyS77Wln+Mfdc7VLqVLAA3wOd4myBy +CRyQGOR+OigRpyoIWblAvQEPjB9y84qP5VWGGI5aTLiLy9a01TD6dKzHI2Avjq72bew Qky4onzZ0Bv/buNvtKZ9ugVKude+twVSmTN92XnyXvNynpieO+uEci153gRYJcdZ9wMm lFvNd0w15S0t5SQ6MD9EKOLvx2QPQ1eSutijkDui43CSR4M32xK+SfqeR6ypTsi3SzCs 5FtA== MIME-Version: 1.0 X-Received: by 10.152.3.42 with SMTP id 10mr80677543laz.84.1427059979554; Sun, 22 Mar 2015 14:32:59 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.82.164 with HTTP; Sun, 22 Mar 2015 14:32:59 -0700 (PDT) In-Reply-To: <494AEF4B-0AF8-449A-9B41-9AC4F4552AF0@FreeBSD.org> References: <1669399171.13.1427029129760.JavaMail.jenkins@jenkins-9.freebsd.org> <799490341.14.1427048792932.JavaMail.jenkins@jenkins-9.freebsd.org> <494AEF4B-0AF8-449A-9B41-9AC4F4552AF0@FreeBSD.org> Date: Sun, 22 Mar 2015 14:32:59 -0700 X-Google-Sender-Auth: 64PjJ_U7jWUfawIxHSroAkBtAPA Message-ID: Subject: Re: Jenkins build is still unstable: FreeBSD_HEAD-tests2 #867 From: Craig Rodrigues To: Dimitry Andric Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "freebsd-testing@freebsd.org" , freebsd-current Current , "jenkins-admin@freebsd.org" , freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 21:33:02 -0000 On Sun, Mar 22, 2015 at 2:29 PM, Dimitry Andric wrote: > > Ah right, that was on i386, on amd64 it does result in -2^63. It is > indeed caused by reliance on signed integer wrapping. > > This diff should fix it, without rewriting the utility: > > Index: bin/expr/Makefile > =================================================================== > --- bin/expr/Makefile (revision 280156) > +++ bin/expr/Makefile (working copy) > @@ -6,6 +6,9 @@ PROG= expr > SRCS= expr.y > YFLAGS= > > +# expr relies on signed integer wrapping > +CFLAGS+= -fwrapv > + > NO_WMISSING_VARIABLE_DECLARATIONS= > > .if ${MK_TESTS} != "no" > Well, another alternative is to patch expr.y: Index: expr.y =================================================================== --- expr.y (revision 280353) +++ expr.y (working copy) @@ -393,7 +393,7 @@ } void -assert_plus(intmax_t a, intmax_t b, intmax_t r) +assert_plus(intmax_t a, intmax_t b, volatile intmax_t r) { /* * sum of two positive numbers must be positive, @@ -420,7 +420,7 @@ } void -assert_minus(intmax_t a, intmax_t b, intmax_t r) +assert_minus(intmax_t a, intmax_t b, volatile intmax_t r) { /* special case subtraction of INTMAX_MIN */ if (b == INTMAX_MIN && a < 0) There were already some patches previously done to this file to add "volatile", so maybe this would be OK to do. What do you think? -- Craig