qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] QEMU x86_64: sles 64, bug with floats (with test program) (


From: Ludovic Drolez
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)
User-agent: Loom/3.14 (http://gmane.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 <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 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]