Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H4wtC-0002on-J7 for qemu-devel@nongnu.org; Thu, 11 Jan 2007 05:10:30 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H4wtB-0002n2-6B for qemu-devel@nongnu.org; Thu, 11 Jan 2007 05:10:30 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H4wtA-0002mY-Rf for qemu-devel@nongnu.org; Thu, 11 Jan 2007 05:10:28 -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 1H4wt9-0006gq-59 for qemu-devel@nongnu.org; Thu, 11 Jan 2007 05:10:27 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1H4wsx-0002Bd-G6 for qemu-devel@nongnu.org; Thu, 11 Jan 2007 11:10:15 +0100 Received: from fbxmetz.linbox.com ([81.56.128.63]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Jan 2007 11:10:15 +0100 Received: from ldrolez by fbxmetz.linbox.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Jan 2007 11:10:15 +0100 From: Ludovic Drolez Date: Thu, 11 Jan 2007 10:09:58 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: news Subject: [Qemu-devel] 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: , To: qemu-devel@nongnu.org Hi ! I've found a bug in Qemu x86_64 under a sles 64 10: conversion of floats to strings fails in some cases. For example, Ganglia (cluster monitoring software), shows random values and as well as PHP5 programs. 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 libapr-1: ======================test.c=============== #include #include #include #include void main(void) { char buf[60]; double d = M_PI; snprintf(buf, 60, "%f\n", d); printf(buf); apr_snprintf(buf, 60, "%f\n", d); printf(buf); } ============================================ Under a SLES 10/64 bits, you'll see something like: 3.141593 3.OjuƧ_ I tested with Qemu 0.8.2 and the CVS, but of course, it works on a real system (a Dell PE1950). 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 ? -- Ludovic DROLEZ Linbox / Free&ALter Soft http://lrs.linbox.org