From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 22:37:06 2015 Return-Path: Delivered-To: svn-src-all@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 65E9750F; Tue, 27 Jan 2015 22:37:06 +0000 (UTC) Received: from mail-ie0-x236.google.com (mail-ie0-x236.google.com [IPv6:2607:f8b0:4001:c03::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2DAD66DD; Tue, 27 Jan 2015 22:37:06 +0000 (UTC) Received: by mail-ie0-f182.google.com with SMTP id ar1so18257980iec.13; Tue, 27 Jan 2015 14:37:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Yp+K26Q+yLgVSGHMLM5+YtFet8LIQAE0/PYc0H5GQs8=; b=M/FeDIm3Hu5oPXHcjZkQ6647z3EiI+ncq7bm31xhb7eqBDRmKpNAHajDN9LAn24/Es NwpCF9KKxgr3iFdsrfXUGBj3aM0u3R1gE8dSgCWXrF8+Ybv5xGevD08/TWH2CD11HRl6 d+vD14EOFCQoaaELAS4vos3soebl9JZtafSEYRqqwtO8Bk2pp8Bc1hZGdpE++gUnMkIG COdhkKw66lni8QigmIY+YSokzhHQI2jpl0vuN+lRrT0YExae5iONQTcrZFyOutgqVM9f o7RqxImPeMyhPhn4Nl4FTPbd+EfG/hjZRZUH86sbtBwHbzcK313eiN+b76RCpToc9WSC l++A== MIME-Version: 1.0 X-Received: by 10.50.107.7 with SMTP id gy7mr208057igb.49.1422398225667; Tue, 27 Jan 2015 14:37:05 -0800 (PST) Received: by 10.50.182.233 with HTTP; Tue, 27 Jan 2015 14:37:05 -0800 (PST) In-Reply-To: <201501271804.t0RI4fbv072693@svn.freebsd.org> References: <201501271804.t0RI4fbv072693@svn.freebsd.org> Date: Tue, 27 Jan 2015 14:37:05 -0800 Message-ID: Subject: Re: svn commit: r277798 - head/bin/expr From: NGie Cooper To: Stefan Esser Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 22:37:06 -0000 On Tue, Jan 27, 2015 at 10:04 AM, Stefan Esser wrote: > Author: se > Date: Tue Jan 27 18:04:41 2015 > New Revision: 277798 > URL: https://svnweb.freebsd.org/changeset/base/277798 > > Log: > Fix overflow check for multiplication: > - Add special test to detect the case of -1 * INTMAX_MIN > - Protect against elimination of the test division by the optimizer > > Garrett Cooper noticed that the overflow checks were incomplete, and Bruce > Evans suggested the use of the "volatile" qualifier to counter the effect > of the undefined behaviour, when the prior multiplication caused overflow, > and he also suggested improvements to the comments. > > Reviewed by: bde > MFC after: 1 week Thank you bde and se for all your hard work and discussion in resolving this issue!! It was really awesome watching the discussion back and forth :).