Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251007012301.GS6263@brightrain.aerifal.cx>
Date: Mon, 6 Oct 2025 21:23:02 -0400
From: Rich Felker <dalias@...c.org>
To: "Jun. T" <takimoto-j@....biglobe.ne.jp>
Cc: musl@...ts.openwall.com
Subject: Re: Bug?: weak alias fpurge() may better be removed

On Sun, Oct 05, 2025 at 06:38:38PM +0900, Jun. T wrote:
> 
> > 2025/10/03 10:09、Rich Felker <dalias@...c.org>のメール:
> > 
> > If anything has linked to it, removing the symbol would break those
> > binaries. I'm not sure if this is justifiable. Configure tests that
> > just check for linkability without testing for successful compilation
> > are buggy and really really need to be fixed. They will cause massive
> > breakage when the right feature-test macros are not defined to expose
> > symbols the program is going to try to use, especially with modern gcc
> > and clang versions that default to disallowing implicit function
> > declarations.
> 
> If any project are using fpurge(), they must supply a prototype
> declaratgion by themselvs. I believe chances are very low. Instead,
> they will use __fpurge(). fpurge(3) manpage clearly states that fpurge()
> is not available (as in GNU libc).

It seems whatever software you're trying to build that was checking
for presence of the symbol was trying to use it. And a quick grep of
/usr/bin on my Alpine system shows that a bunch of binaries from
coreutils have references to the fpurge symbol. Removing it would
thereby produce a completely broken system. I don't think this is
viable.

Whatever configure test is detecting it should be fixed so that future
binaries don't get built attempting to use it without a declaration.
If this is done, they won't care if the symbol is there or not. As I
explained before, this kind of broken configure test can produce
serious bugs *even with symbols that were intended to be public* when
they're not exposed by the headers in the FTM profile the software is
being built with (e.g. if they try to use splice() without _GNU_SOURCE
or _ALL_SOURCE).

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.