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

Bug#419225: segfault on some kind of printf

Package: libc6
Version: 2.5-1
Severity: grave

--- Please enter the report below this line. ---

The recent libc6 makes printf segfault with some kind of arguments.
I do not (yet) test all of the possibility, but here is a small example :

#include <stdio.h>
int main() {
        //double a=0.00999624628294258;
        double a=9.99624628294258e-05;
        printf("e: %e\n", a);
        printf("f: %f\n", a);
        printf("g: %g\n", a);
        printf("e: %.3e\n", a);
        printf("f: %.3f\n", a);
        printf("g: %.3g\n", a);
        return 0;

I tried to compile and run on this machine (i386, up-to-date sid)
and an AMD64 (also up-to-date, sid, ie libc6 2.5-1)
In both case, this program gives :
vdanjean@cayuga:~$ ./toto
e: 9.996246e-05
f: 0.000100
g: 9.99625e-05
e: 9.996e-05
f: 0.000
Erreur de segmentation

I also tried this program with a "a few months old sid" with a 2.3.6.ds1-10
libc6 (amd64). It works perfectly.
I tried to run the previous (working) binary on my up-to-date sid amd64.
I get the segfault. So, the bug does not seem to come from the compiler.

  Best regards,

PS: with the other value of a (in comment in the program above), there is
no segfault...

--- System information. ---
Architecture: i386
Kernel:       Linux 2.6.18-4-686

Debian Release: lenny/sid
  990 unstable        www.debian-multimedia.org
  990 unstable        www-id.imag.fr
  990 unstable        people.debian.org
  990 unstable        kooot
  990 unstable        ftp.fr.debian.org
  500 testing         security.debian.org
  500 testing         ftp.fr.debian.org
  500 stable          people.debian.org
  500 stable          ftp.fr.debian.org
    1 experimental    ftp.fr.debian.org

--- Package information. ---
Depends       (Version) | Installed

Reply to: