From owner-freebsd-current@FreeBSD.ORG Sun Mar 22 22:01:27 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74909E09; Sun, 22 Mar 2015 22:01:27 +0000 (UTC) Received: from mail-la0-x234.google.com (mail-la0-x234.google.com [IPv6:2a00:1450:4010:c03::234]) (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 E0409D8E; Sun, 22 Mar 2015 22:01:26 +0000 (UTC) Received: by lagg8 with SMTP id g8so121216876lag.1; Sun, 22 Mar 2015 15:01:25 -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=iL70EmHePH1o/E5SGc4YhyCEgj/7f3plGUrw3c0qOFk=; b=CUvBRllErHmA0TfSDH2IOgqajuzqjlfPvQYalo6cNNDR5+ZzcRKcmqSrJD6F2nRIGf Zx/6W4CH32SFhCxy6I5z+SL8b1OE3qggu9VUdewJnVQpOITYFipoEjV3p0reiHhnpsy7 lsRro7+zCUN7Ib+r07w8PlyYNcaMonF9zYRTmp8sQ+6FHTVQMaB2/tsRRslKtK4XtGTl PyDbpRVL8Rb2alTRccClnti2Y6ZCm/hnq6YSm2bvUwGp7hdgzlDar8Li1rEV9L6mY00C wdr2nkCnOvVs9aA+tcjYt5BO547twbo4atvci3MTjsUlZFeTyg/HAv6uf1src84MybhD giFQ== MIME-Version: 1.0 X-Received: by 10.152.3.42 with SMTP id 10mr80747513laz.84.1427061685096; Sun, 22 Mar 2015 15:01:25 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.82.164 with HTTP; Sun, 22 Mar 2015 15:01:25 -0700 (PDT) In-Reply-To: <864EB4DB-2DF7-4294-9498-95E54E6B49CC@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> <864EB4DB-2DF7-4294-9498-95E54E6B49CC@FreeBSD.org> Date: Sun, 22 Mar 2015 15:01:25 -0700 X-Google-Sender-Auth: ZYeQeFL3AW0rAaA67H01MfnpFQo 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-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 22:01:27 -0000 On Sun, Mar 22, 2015 at 2:36 PM, Dimitry Andric wrote: > On 22 Mar 2015, at 22:32, Craig Rodrigues wrote: > > > > 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? > > Volatile is not the solution, it is completely orthogonal. The correct > way would be to use unsigned integers, for which wrapping is defined, > then convert those back and forth when presenting the results to the > user. > OK, converting expr.y to use unsigned integers would require a bit of work. Can you commit your patch to the Makefile? It fixes the problem for now. -- Craig