From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GxR9j-0003De-Rc for qemu-devel@nongnu.org; Thu, 21 Dec 2006 11:52:31 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GxR9j-0003DS-3X for qemu-devel@nongnu.org; Thu, 21 Dec 2006 11:52:31 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GxR9i-0003DP-WE for qemu-devel@nongnu.org; Thu, 21 Dec 2006 11:52:31 -0500 Received: from [62.212.120.90] (helo=fbxmetz.linbox.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GxR9i-0005Qh-Dt for qemu-devel@nongnu.org; Thu, 21 Dec 2006 11:52:30 -0500 Received: from [192.168.0.14] (helo=[192.168.0.14]) by fbxmetz.linbox.com with esmtp (Exim 3.36 #1 (Debian)) id 1GxR9a-0003n0-00 for ; Thu, 21 Dec 2006 17:52:22 +0100 Message-ID: <458ABBC6.3020706@linbox.com> Date: Thu, 21 Dec 2006 17:52:22 +0100 From: Ludovic Drolez MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] QEMU x86_64: bug with floats (with test program) 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: conversion of floats to strings fails in some cases. For example, Ganglia (cluster monitoring software), shows random values and as well as PHP5 programs. 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, and 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