From owner-freebsd-bugs Mon Mar 19 14:15: 3 2001 Delivered-To: freebsd-bugs@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 02EB137B73B for ; Mon, 19 Mar 2001 14:14:50 -0800 (PST) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 19 Mar 2001 22:11:49 +0000 (GMT) To: G Hasse Cc: Garrett Wollman , Peter Pentchev , freebsd-bugs@FreeBSD.ORG Subject: Re: misc/25904: Error in the printf-function. In-reply-to: Your message of "Mon, 19 Mar 2001 20:41:01 +0100." X-Request-Do: Date: Mon, 19 Mar 2001 22:11:48 +0000 From: David Malone Message-ID: <200103192211.aa09398@salmon.maths.tcd.ie> Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > And why is there differnces in Linux and FreeBSD? Is there > some right and wrong here? The double the %f was expecting would be 64 bits long on an i386. The pointer was only 32 bits long, so when printf went to read the other 32 bits it read something random out of memory (maybe the return address, maybe some data from another function). The random data was different so you got different results. It is relatively hard to get a compiler and libraries to do the same thing on every platform when they are used correctly. If you use them incorrectly you can't expect any consistancey. David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message