Subject: Re: bug#9612: sort: avoid a NaN-induced infloop

From: Jim Meyering <[email-masked]>
Date: Tue, 27 Sep 2011 19:24:25 +0200

Andreas Schwab wrote:
> Jim Meyering <[email-masked]> writes:
>
>> The statement "long double x = NAN;" (inside glibc's strtold) leaves many
>> bits of "x" uninitialized.
>
> You are looking at padding bits, which have unspecified contents.

I realize that they are unspecified.
That is why I did not claim that this is a POSIX violation.
POSIX says little about what strtold must do for a "NaN" string.
However, I am dismayed that with glibc's strtold the values of those bits
is not deterministic.  That makes sorting NaN values obtained from strtold
unnecessarily hard.