mailing list of musl libc
 help / color / mirror / code / Atom feed
From: "Gary E. Miller" <gem@rellim.com>
To: musl@lists.openwall.com
Subject: Re: [musl] ✘strerror_r() bug in musl
Date: Tue, 12 Apr 2022 14:13:24 -0700	[thread overview]
Message-ID: <20220412141324.5d344e74@spidey.rellim.com> (raw)
In-Reply-To: <1649796698.dhgj3g2orq.none@localhost>

[-- Attachment #1: Type: text/plain, Size: 1716 bytes --]

Yo Alex!

On Tue, 12 Apr 2022 16:56:20 -0400
"Alex Xu (Hello71)" <alex_y_xu@yahoo.ca> wrote:

> The issue of GNU-specific strerror_r has been discussed several times
> on the mailing list: https://inbox.vuxu.org/musl/?q=strerror_r. See:
> 
> -
> https://inbox.vuxu.org/musl/20130208185918.GJ20323@brightrain.aerifal.cx/
> -
> https://inbox.vuxu.org/musl/20180805010455.GQ1392@brightrain.aerifal.cx/
> 
> and other threads.


The one suggests strerror_l(), which is uselsss for obvious reasons:

   strerror_l()
       strerror_l() is like strerror(), but maps errnum to a  locale-dependent
       error  message in the locale specified by locale.  The behavior of str‐
       error_l()  is  undefined  if  locale  is  the  special  locale   object
       LC_GLOBAL_LOCALE or is not a valid locale object handle.

I'm not going to ever use a function that in many (most?) cases has
"behavior... undefined".

gpsd, finally, solved the problem, by creating a configure test for
the unexpected and undocumented behaviour of strerror_r() in musl.

The other trhead says:

    > Is this a bug in musl?

    No, musl explicitly does not suppore the GNU interfaces that conflict
    with standard interfaces by the same name.

After looking all over the musl source and doc, I can strongly assert that
whatever is "explicitly" statad is very, very, hard to find.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem@rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 851 bytes --]

  parent reply	other threads:[~2022-04-12 21:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12 20:43 Gary E. Miller
2022-04-12 20:48 ` alice
2022-04-12 21:04   ` Gary E. Miller
2022-04-12 20:56 ` Alex Xu (Hello71)
2022-04-12 21:07   ` Gary E. Miller
2022-04-12 23:16     ` Wolf
2022-04-13  0:15       ` Gary E. Miller
2022-04-12 21:13   ` Gary E. Miller [this message]
2022-04-13  3:44 ` Rich Felker
2022-04-13 12:24 ` [musl] *strerror_r() " Natanael Copa
2022-04-13 14:05   ` Rich Felker
2022-04-13 17:36     ` Gary E. Miller
2022-04-13 20:38       ` Rich Felker
2022-04-13 21:16         ` Gary E. Miller
2022-04-13 22:27           ` Rich Felker
2022-04-13 22:43             ` Gary E. Miller
2022-04-13 22:58               ` Rich Felker
2022-04-13 23:07                 ` Gary E. Miller

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=20220412141324.5d344e74@spidey.rellim.com \
    --to=gem@rellim.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).