From owner-freebsd-bugs Mon May 29 11: 7: 8 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from sasami.jurai.net (sasami.jurai.net [63.67.141.99]) by hub.freebsd.org (Postfix) with ESMTP id D93E437BCE4 for ; Mon, 29 May 2000 11:06:49 -0700 (PDT) (envelope-from mellon@jurai.net) Received: (from mellon@localhost) by sasami.jurai.net (8.9.3/8.8.7) id OAA68079; Mon, 29 May 2000 14:06:40 -0400 (EDT) Date: Mon, 29 May 2000 14:06:40 -0400 From: Anatoly Vorobey To: Alexander Langer Cc: freebsd-bugs@freebsd.org Subject: Re: kern/18874: 32bit NFS servers export wrong negative values to 64bit clients Message-ID: <20000529140640.A68038@sasami.jurai.net> References: <200005291800.LAA61128@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200005291800.LAA61128@freefall.freebsd.org>; from alex@big.endian.de on Mon, May 29, 2000 at 11:00:08AM -0700 X-Disclaimer: I was young, I needed the money! Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org You, Alexander Langer, were spotted writing this on Mon, May 29, 2000 at 11:00:08AM -0700: > > Bummer, scenario C shouldn't work at all -- can you check? But this > > isn't your case, your case is scenario B IIRC -- and the conversion > > should work fine, my patch corrects the problem which might happen > > because the value gets divided before the third stage, when the compiler > > still thinks it's unsigned 64bit. > > I'll test soon. At the moment I'm building world. I'll also try the > quad_t cast instead of the long cast. Ah, now I see what you mean -- casting to quad_t instead of long before dividing, and then casting the result to long (it's better than letting the assignment do the cast IMHO because we're casting down on i386). I misunderstood you before. I think it's a good idea, and better than my patch. -- Anatoly Vorobey, mellon@pobox.com http://pobox.com/~mellon/ "Angels can fly because they take themselves lightly" - G.K.Chesterton To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message