From: Ludovic Drolez <ldrolez@linbox.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] QEMU x86_64: sles 64, bug with floats (with test program) (3rd try)
Date: Thu, 11 Jan 2007 10:09:58 +0000 (UTC) [thread overview]
Message-ID: <loom.20070111T110730-448@post.gmane.org> (raw)
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 <stdio.h>
#include <math.h>
#include <apr.h>
#include <apr_strings.h>
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
next reply other threads:[~2007-01-11 10:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-11 10:09 Ludovic Drolez [this message]
2007-01-11 11:00 ` [Qemu-devel] Re: QEMU x86_64: sles 64, bug with floats (with test program) (3rd try) Loiseleur Michel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20070111T110730-448@post.gmane.org \
--to=ldrolez@linbox.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.