From owner-freebsd-arch Sun Oct 28 22:26:31 2001 Delivered-To: freebsd-arch@freebsd.org Received: from peter3.wemm.org (c1315225-a.plstn1.sfba.home.com [24.14.150.180]) by hub.freebsd.org (Postfix) with ESMTP id 8639437B401; Sun, 28 Oct 2001 22:26:18 -0800 (PST) Received: from overcee.netplex.com.au (overcee.wemm.org [10.0.0.3]) by peter3.wemm.org (8.11.0/8.11.0) with ESMTP id f9T6QIM56590; Sun, 28 Oct 2001 22:26:18 -0800 (PST) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 396303808; Sun, 28 Oct 2001 22:26:18 -0800 (PST) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Mike Smith Cc: John Baldwin , arch@FreeBSD.ORG Subject: Re: time_t not to change size on x86 In-Reply-To: <200110290244.f9T2ihc04347@mass.dis.org> Date: Sun, 28 Oct 2001 22:26:18 -0800 From: Peter Wemm Message-Id: <20011029062618.396303808@overcee.netplex.com.au> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Mike Smith wrote: > > Changing alpha isn't near as "bad" as changing i386, as it already passes a rg > > s > > in 64-bit registers, so printf won't break, etc. I don't think i386 should > > ever change, personally, but I don't think it will really break Alpha near as > > much as i386. > > As with most folk, you forget pass-by-reference here. 8) We had one of these in the ACPICA code recently. :-) A pointer to int had been cast that hid the fact that it was a 32/64 bit mismatch. *NO* compiler warnings will detect that. Specifically, it was: int i; int j; bus_read_ivar(dev, ....., (uintptr_t *)&i); .. which was silently accepted by the compiler. And 'i' was written as a 'long' and consequently trashed the 'j' variable that was on the stack right after it. (uintptr_t is 64 bit on non-i386) We risk the same problem in 3rd party apps. Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message