NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lib/56148: lib/libc/stdio/t_printf:snprintf_float test randomly fails
The following reply was made to PR lib/56148; it has been noted by GNATS.
From: Joerg Sonnenberger <joerg%bec.de@localhost>
To: Christos Zoulas <christos%zoulas.com@localhost>
Cc: gnats-bugs%netbsd.org@localhost, lib-bug-people%netbsd.org@localhost,
gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost,
Andreas Gustafsson <gson%gson.org@localhost>
Subject: Re: lib/56148: lib/libc/stdio/t_printf:snprintf_float test randomly
fails
Date: Sun, 9 May 2021 19:58:48 +0200
On Sun, May 09, 2021 at 01:27:39PM -0400, Christos Zoulas wrote:
> I am not aware of any libc implementations that don't allocate memory to do double-to-ascii conversions.
> From what I've seen Solaris does the best here calling malloc only in __big_float_times_power().
> I don't see us replacing gdtoa anytime soon, so we should probably document this in the snprintf() man pages.
> We could also file a bug report with opengroup/posix to make ENOMEM legal for floating point conversions.
It isn't even a question of replacing gdtoa, the alternatives will very,
very likely run into the same problem that the power-of-five tables are
huge if pre-computed or require large stack space or allocations if
computed dynamically. That's the nature of the problem.
Joerg
Home |
Main Index |
Thread Index |
Old Index