From owner-freebsd-testing@FreeBSD.ORG Sun Mar 22 21:37:31 2015 Return-Path: Delivered-To: freebsd-testing@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 AFE216EF; Sun, 22 Mar 2015 21:37:31 +0000 (UTC) Received: from mail-pa0-x229.google.com (mail-pa0-x229.google.com [IPv6:2607:f8b0:400e:c03::229]) (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 6B550AC3; Sun, 22 Mar 2015 21:37:31 +0000 (UTC) Received: by pabxg6 with SMTP id xg6so157560019pab.0; Sun, 22 Mar 2015 14:37:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=AnCijlR/ZSj7VqR8tlOleZ1dNaysWJNmoyDTkbs+5cI=; b=NERHttlR76bRFiuJFjTcHV6R+0BiriEfYt4dM948+HHxX13EFVtp0kHC9swf2Zp6Jn fB+nTH+x34D4b29o8zPo5AvDPOwKsmS4ECiXo1WFAFFMoSwxMYSneZpDkoYpkerW62qY iTmKdlbv9v/zv2kBprXoCPeSumnD0GO65vEtHblxruxxS1y/tcO5BgnqHb2HhQiZWvbD dulzRnegFHsrODOyDr35VWo1sE0RHAp6JGuZCCcg9PozOxUcqxLUGSW+oE4uFCF9v8VY kTdocJ/aQb90D8ffFWelio6fcKafIvy6686MC7saWczi2pksLgtKO7K3k/IOBPyN6NJ1 wUtg== X-Received: by 10.66.154.17 with SMTP id vk17mr205034907pab.5.1427060251000; Sun, 22 Mar 2015 14:37:31 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:7544:258:ce3d:185a? ([2601:8:ab80:7d6:7544:258:ce3d:185a]) by mx.google.com with ESMTPSA id jh2sm5157475pbb.25.2015.03.22.14.37.29 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 22 Mar 2015 14:37:30 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_304F0F11-EC28-4252-9E60-0A9BD13758EF"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Jenkins build is still unstable: FreeBSD_HEAD-tests2 #867 From: Garrett Cooper In-Reply-To: <864EB4DB-2DF7-4294-9498-95E54E6B49CC@FreeBSD.org> Date: Sun, 22 Mar 2015 14:37:28 -0700 Message-Id: <3E288A39-D7DB-458A-B425-8B449DD57E35@gmail.com> 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> To: Dimitry Andric X-Mailer: Apple Mail (2.1878.6) Cc: "freebsd-testing@freebsd.org" , freebsd-current Current , "jenkins-admin@freebsd.org" , freebsd-toolchain@freebsd.org X-BeenThere: freebsd-testing@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Testing on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 21:37:31 -0000 --Apple-Mail=_304F0F11-EC28-4252-9E60-0A9BD13758EF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Mar 22, 2015, at 14:36, Dimitry Andric wrote: > On 22 Mar 2015, at 22:32, Craig Rodrigues wrote: >>=20 >> On Sun, Mar 22, 2015 at 2:29 PM, Dimitry Andric = wrote: >>=20 >> Ah right, that was on i386, on amd64 it does result in -2^63. It is = indeed caused by reliance on signed integer wrapping. >>=20 >> This diff should fix it, without rewriting the utility: >>=20 >> Index: bin/expr/Makefile >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- bin/expr/Makefile (revision 280156) >> +++ bin/expr/Makefile (working copy) >> @@ -6,6 +6,9 @@ PROG=3D expr >> SRCS=3D expr.y >> YFLAGS=3D >>=20 >> +# expr relies on signed integer wrapping >> +CFLAGS+=3D -fwrapv >> + >> NO_WMISSING_VARIABLE_DECLARATIONS=3D >>=20 >> .if ${MK_TESTS} !=3D "no" >>=20 >>=20 >> Well, another alternative is to patch expr.y: >>=20 >> Index: expr.y >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- expr.y (revision 280353) >> +++ expr.y (working copy) >> @@ -393,7 +393,7 @@ >> } >>=20 >> 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 @@ >> } >>=20 >> 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 =3D=3D INTMAX_MIN && a < 0) >>=20 >>=20 >> There were already some patches previously done to this >> file to add "volatile", so maybe this would be OK to do. >>=20 >> What do you think? >=20 > 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. Before doing that =97 what changed in the past week that changed the = behavior of expr? Thanks! --Apple-Mail=_304F0F11-EC28-4252-9E60-0A9BD13758EF Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVDzYYAAoJEMZr5QU6S73eHW0H/RWRCspXwSZo7vbqsy6iRuOU 3Sr+rFduyTFuY1/TTnbLZYEUG/RmzS0hHDzw78r9XGh/5omjsiVXCIbV0GPIP07r Xy3T2qAuSdTi140mwcJMDCXpQQPXhtrIw4y1ZkrMJEe1+fVuOldRAPJJfiI5hJMC SnKLvAxhQ/KdQVTkB/DUN9XvZ2TeWRlinChGNA4Ca+5UoPZlHYI+cQWcybsSyQEA Z3Fho4XY3Tt8O6SUKramxaE638WgTD+0TWTxcz2kCo+hSdJnZ0T5cF9xQNb6DwR0 XzMoWsnOJVRgB7N3TDb5FhdBgJLYX8rwkwL0/ByAmoyc9r8oGlMlT8XtF/gxHNw= =DmrI -----END PGP SIGNATURE----- --Apple-Mail=_304F0F11-EC28-4252-9E60-0A9BD13758EF--