[Top][All Lists]

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

Re: printf-safe checks of invalid long double values

From: Paul Eggert
Subject: Re: printf-safe checks of invalid long double values
Date: Thu, 27 Nov 2014 20:37:59 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

Pádraig Brady wrote:
   Are these checks backed up by corresponding replacement code?
   Are these checks correct?
   Why has glibc not been updated in the 7 years since the checks were added?

As I recall, this comes from an old dispute about what glibc should do when asked to print floating-point bit-patterns that cannot be generated by the machine's floating-point operations. This has undefined behavior in glibc (and POSIX allows this), but undefined behavior can be catastrophic in programs like 'od' which will crash when asked to print arbitrary data as if it were floating-point. So coreutils insists on a substitute for printf for this situation.

See the thread starting here:


reply via email to

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