Date: Tue, 27 Jan 2015 14:37:05 -0800 From: NGie Cooper <yaneurabeya@gmail.com> To: Stefan Esser <se@freebsd.org> Cc: "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org> Subject: Re: svn commit: r277798 - head/bin/expr Message-ID: <CAGHfRMBGwqXuU5MY%2BLyWrfqMWZXX_iF6Ez=6V7UgP22L=Tkfxg@mail.gmail.com> In-Reply-To: <201501271804.t0RI4fbv072693@svn.freebsd.org> References: <201501271804.t0RI4fbv072693@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 27, 2015 at 10:04 AM, Stefan Esser <se@freebsd.org> 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 :).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGHfRMBGwqXuU5MY%2BLyWrfqMWZXX_iF6Ez=6V7UgP22L=Tkfxg>