This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/4362] New: printf segfaults on some fp values


The following programs segfaults on the last printf(). Using the commented 
variable does not trigger the problem.

This problem happens with glibc CVS and glibc 2.5, but not on glibc 2.3.6. This 
bug has been tested so far on x86, x86_64 and sparc, but I suspect all 
platforms are affected.

#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;
}

-- 
           Summary: printf segfaults on some fp values
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: critical
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: aurelien at aurel32 dot net
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=4362

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]