From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H4xfI-0005SL-KB for qemu-devel@nongnu.org; Thu, 11 Jan 2007 06:00:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H4xfG-0005Qx-Oq for qemu-devel@nongnu.org; Thu, 11 Jan 2007 06:00:11 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H4xfF-0005Qh-R9 for qemu-devel@nongnu.org; Thu, 11 Jan 2007 06:00:09 -0500 Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H4xfE-0000rD-Tr for qemu-devel@nongnu.org; Thu, 11 Jan 2007 06:00:09 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1H4xfB-0008Oj-8i for qemu-devel@nongnu.org; Thu, 11 Jan 2007 12:00:05 +0100 Received: from hoth.linagora.com ([84.14.148.69]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Jan 2007 12:00:05 +0100 Received: from mloiseleur by hoth.linagora.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Jan 2007 12:00:05 +0100 From: Loiseleur Michel Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable In-Reply-To: Sender: news Subject: [Qemu-devel] Re: QEMU x86_64: sles 64, bug with floats (with test program) (3rd try) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Thu, 11 Jan 2007 11:00:13 -0000 To: qemu-devel@nongnu.org Ludovic Drolez wrote: > Hi ! >=20 > I've found a bug in Qemu x86_64 under a sles 64 10: conversion of float= s=20 > to strings fails in some cases. For example, Ganglia (cluster monitorin= g > software), shows random values and as well as PHP5 programs. >=20 > Here is a simple test program to confirm that you have the same bug as = me > (maybe also under another distribution). Compile this and link with lib= apr-1: >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dtest.= c=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > #include > #include > #include > #include >=20 > void main(void) > { > char buf[60]; > double d =3D M_PI; >=20 > snprintf(buf, 60, "%f\n", d); > printf(buf); > apr_snprintf(buf, 60, "%f\n", d); > printf(buf); >=20 > } > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > Under a SLES 10/64 bits, you'll see something like: > 3.141593 > 3.Oju=C3=A7_ >=20 > I tested with Qemu 0.8.2 and the CVS, but of course, it works on a real= > system (a Dell PE1950). >=20 > So it's a QEMU bug. Is it triggered by weird code produced by gcc 4.1.0= ? Or a > FPU emulation bug ? Any ideas ? >=20 A bug in apr, maybe, no ? Rgds, --=20 Michel Loiseleur