mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Gabriel Ravier <gabravier@gmail.com>
To: musl@lists.openwall.com
Subject: [musl] ecvt(0, 0, ...) is broken
Date: Tue, 6 Sep 2022 12:12:48 +0200	[thread overview]
Message-ID: <6c1dfc63-b3e8-46a3-1db1-4d5bdf031086@gmail.com> (raw)
In-Reply-To: <7bf9a30d-4ba8-1fe7-8c80-db99446db307@gmail.com>

Executing ecvt(0, 0, &decpt, &sign) results in musl returning 
"000000000000000".

This seems highly likely to be a bug considering that glibc returns "" 
and I see no plausible reasoning for musl's behavior that could be 
justified by the standard.

This seems to be caused by musl's ecvt containing this line of code:

if (n-1U > 15) n = 15;

which I would assume was not intended to match n == 0.


  reply	other threads:[~2022-09-06 10:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-06  9:27 [musl] Bug report: fcvt seems dysfunctional Gabriel Ravier
2022-09-06 10:12 ` Gabriel Ravier [this message]
2022-09-06 12:13   ` [musl] ecvt(0, 0, ...) is broken Joakim Sindholt
2022-09-06 12:21     ` Gabriel Ravier
2022-09-06 14:17       ` Rich Felker
2022-09-06 18:48         ` Markus Wichmann
2022-09-06 19:19           ` Rich Felker
2022-09-07  3:39             ` Markus Wichmann
2022-09-07  3:51               ` Jeffrey Walton
2022-09-07 13:44                 ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6c1dfc63-b3e8-46a3-1db1-4d5bdf031086@gmail.com \
    --to=gabravier@gmail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).