From owner-cvs-all@FreeBSD.ORG Mon Jun 28 20:18:22 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 9891D16A4E7; Mon, 28 Jun 2004 20:18:22 +0000 (GMT) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.12.11/8.12.11) with ESMTP id i5SKIMmP023816; Mon, 28 Jun 2004 16:18:22 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.12.11/8.12.11/Submit) id i5SKILir023815; Mon, 28 Jun 2004 16:18:21 -0400 (EDT) (envelope-from green) Date: Mon, 28 Jun 2004 16:18:21 -0400 From: Brian Fundakowski Feldman To: Andrew Gallatin Message-ID: <20040628201821.GA23618@green.homeunix.org> References: <200406281915.i5SJFeaV060231@repoman.freebsd.org> <20040628152232.A2977@grasshopper.cs.duke.edu> <20040628193858.GG5635@green.homeunix.org> <16608.30892.745161.730935@grasshopper.cs.duke.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16608.30892.745161.730935@grasshopper.cs.duke.edu> User-Agent: Mutt/1.5.6i cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/vm vm_map.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2004 20:18:23 -0000 On Mon, Jun 28, 2004 at 03:59:40PM -0400, Andrew Gallatin wrote: > > Brian Fundakowski Feldman writes: > > On Mon, Jun 28, 2004 at 03:22:33PM -0400, Andrew Gallatin wrote: > > > Andrew Gallatin [gallatin@FreeBSD.org] wrote: > > > > gallatin 2004-06-28 19:15:40 UTC > > > > > > > > FreeBSD src repository > > > > > > > > Modified files: > > > > sys/vm vm_map.c > > > > Log: > > > > Fix alpha - the use of min() on longs was loosing the high bits and > > > > returning wrong answers, leading to strange values vm2->vm_{s,t,d}size. > > > > > > Why are min() and max() inlines which operate on ints? This seems > > > like a real landmine for 64-bit platforms.. > > > > Also, why is GCC not generating the correct warnings? The values passed > > in were definitely a 64-bit type. Thanks for finding and fixing this. > > I wish I knew. I'm afraid this may bite us at some other point? GCC not actually type-checking here is certainly a bug from my viewpoint and one whose existence makes me more than a little worried about further problems with min() and friends (ones that I did not introduced ;). Are there any GCC experts that can help out, here? > > The inlines seem to exist to work around the effect of using macros > > unknowingly on statements with side effects. These should really be > > MIN(), and there seems to have been an extra tab that crept in. Do > > you think you could change those things? > > Sure. Already done. Thanks for the blessing to use MIN(). Thanks again! -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\