Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jun 2004 16:18:21 -0400
From:      Brian Fundakowski Feldman <green@FreeBSD.org>
To:        Andrew Gallatin <gallatin@cs.duke.edu>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/vm vm_map.c
Message-ID:  <20040628201821.GA23618@green.homeunix.org>
In-Reply-To: <16608.30892.745161.730935@grasshopper.cs.duke.edu>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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.                       \,,,,,,,,,,,,,,,,,,,,,,\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040628201821.GA23618>