public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
To: cygwin@cygwin.com, newlib@sourceware.org
Subject: Re: strverscmp is buggy in newlib 4.4.0 (was: Cygwin 3.4.6)
Date: Tue, 2 Jan 2024 10:36:56 -0700	[thread overview]
Message-ID: <1f182ad0-bf0d-4cf7-9829-8b7e7cbd6b43@SystematicSW.ab.ca> (raw)
In-Reply-To: <13421190.uLZWGnKmhe@nimes>

On 2024-01-02 03:23, Bruno Haible via Cygwin wrote:
> Here's a test case of strverscmp, from Dmitry Bogatov [1]
> #include <string.h>
> int main ()
> {
>    return strverscmp ("UNKNOWN", "2.2.0") <= 0;
> }
> It succeeds on glibc and musl libc 1.2.4, but fails on musl libc 1.2.3
> and Cygwin 2.9.0 and 3.4.6.
> The cause is apparently that Cygwin's strverscmp implementation was
> borrowed from musl libc (Cygwin commit 59e09b6419cdf400be3c73b61ac9c22560dc397e)
> at a time when musl libc's implementation was buggy. In musl libc, it is
> meanwhile fixed, through
> https://git.musl-libc.org/cgit/musl/commit/src/string/strverscmp.c?id=b50eb8c36c20f967bd0ed70c0b0db38a450886ba
> [1] https://lists.gnu.org/archive/html/bug-gnulib/2024-01/msg00002.html

Issue is in newlib (x-post and followups set):
https://sourceware.org/cgit/newlib-cygwin/tree/newlib/libc/string/strverscmp.c

patch with git log msg:
https://git.musl-libc.org/cgit/musl/patch/src/string/strverscmp.c?id=b50eb8c36c20f967bd0ed70c0b0db38a450886ba

Gnulib discussion:
https://lists.gnu.org/archive/html/bug-gnulib/2024-01/msg00002.html

Musl thread starts:
https://www.openwall.com/lists/musl/2022/11/06/1

bare patch without git log msg attached to:
https://www.openwall.com/lists/musl/2022/11/08/1

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry


       reply	other threads:[~2024-01-02 17:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <13421190.uLZWGnKmhe@nimes>
2024-01-02 17:36 ` Brian Inglis [this message]
2024-01-04 12:28   ` strverscmp is buggy in newlib 4.4.0 (was " Brian Inglis
2024-01-08 12:16     ` Corinna Vinschen
     [not found] ` <1052086998.4232956.1704227350804@mail.yahoo.com>
2024-01-02 21:28   ` strverscmp is buggy in newlib 4.4.0 (was: " Brian Inglis

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=1f182ad0-bf0d-4cf7-9829-8b7e7cbd6b43@SystematicSW.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin@cygwin.com \
    --cc=newlib@sourceware.org \
    /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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).