Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Wed, 25 Sep 2019 09:32:35 -0500
From: "Anastasios" <>
To: "" <>
Subject: Bug report: strtod drops LSB


Consider this program, strtod.c:

    #include <stdlib.h>
    #include <stdio.h>

    int main()
        printf("%lf\n", strtod("283686952306183", NULL));

With current musl master from Git:

    $ musl-gcc -static strtod.c -o a.musl
    $ ./a.musl

By comparison, with glibc:

    $ gcc -static strtod.c -o a.glibc
    $ ./a.glibc

The correct binary representation of this float is


but musl strtod produces


i.e., it fails to set the LSB. I examined this while ruling out printf as the cause.
Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.