Date: Mon, 19 Mar 2001 22:11:48 +0000 From: David Malone <dwmalone@maths.tcd.ie> To: G Hasse <gh@raditex.se> Cc: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>, Peter Pentchev <roam@orbitel.bg>, freebsd-bugs@FreeBSD.ORG Subject: Re: misc/25904: Error in the printf-function. Message-ID: <200103192211.aa09398@salmon.maths.tcd.ie> In-Reply-To: Your message of "Mon, 19 Mar 2001 20:41:01 %2B0100." <Pine.BSF.4.21.0103192040000.13646-100000@gandalf.sickla.raditex.se>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi? <200103192211.aa09398>