mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: Robert Clausecker <fuz@fuz.su>
Cc: musl@lists.openwall.com
Subject: Re: [musl] getpwuid() calls getline() which may be redefined
Date: Mon, 17 Apr 2023 15:39:57 -0400	[thread overview]
Message-ID: <20230417193956.GO4163@brightrain.aerifal.cx> (raw)
In-Reply-To: <ZD14vr35ZF2k+fd/@fuz.su>

On Mon, Apr 17, 2023 at 06:50:06PM +0200, Robert Clausecker wrote:
> Greetings,
> 
> I'm the maintainer of schilytools [1], a suite of tools including
> cdrecord, mkisofs, star, smake, and others.  To produce Linux
> binary releases for our users, I investigated building static
> binaries with musl and found that the star command experienced
> problems [3]: when built with
> 
>     smake LINKMODE=static LDOPTX=-static INS_RBASE=/opt/schily SHLIB_BUILD=\#
> 
> the program hangs reading from stdin.  With the help of psykose
> from your IRC channel, we found that this is due to getpwuid()
> calling getline(), a symbol which this program uses for a custom
> function with a POSIX-incompatible signature.  This use of the
> getline() symbol dates back to UNOS [2], an early UNIX close.
> 
> We'll try to work around this issue, likely by renaming our
> getline() to something else.  I have filed this bug report with
> you so you may decide if you wish to route the getline() call
> through an internal symbol alias, proofing your library against
> incompatible external redefinitions.

Thanks for the report. getline has been POSIX for 15 years now, and we
don't aim for namespace-conformance to non-latest versions of the
standard. Namespace-guarded symbols are only used where we want to
implement one function in terms of another whose name isn't reserved
under the same standards-profile. Just renaming the function on the
application side to bring it up to modern standards is the right fix
here. (And it's good to hear somebody's still maintaining Schilly's
stuff!)

Rich

      reply	other threads:[~2023-04-17 19:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-17 16:50 Robert Clausecker
2023-04-17 19:39 ` Rich Felker [this message]

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=20230417193956.GO4163@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=fuz@fuz.su \
    --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).