From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: musl 1.1.19 exposes bug in GNU make
Date: Sun, 25 Mar 2018 13:12:21 -0400 [thread overview]
Message-ID: <20180325171221.GF1436@brightrain.aerifal.cx> (raw)
In-Reply-To: <20180313171851.GA30854@brightrain.aerifal.cx>
On Tue, Mar 13, 2018 at 01:18:51PM -0400, Rich Felker wrote:
> musl 1.1.19 introduced the _DIRENT_HAVE_D_* macros in commit
> 1bc10ffeaa7c7ce44b3e214e02e302642511c7c7, triggering a bug in GNU make
> that's present up to the current version:
>
> http://git.savannah.gnu.org/cgit/make.git/tree/glob/glob.c?id=5d653b535a0e0e607c8be2016bcaadd6f326a698#n1333
>
> The glob replacement they ship includes and uses internally a
> GLOB_ONLYDIR flag, which is opportunistic and implemented via d_type
> if _DIRENT_HAVE_D_TYPE is defined, and it fails to consider that
> DT_LNK could be a symlink to a directory. This is an ancient version
> of glob.c; the modern GNU glob in glibc rightly considers DT_LNK. Thus
> the bug is not seen on glibc systems (where the glob replacement is
> not used), but will be seen on any system where _DIRENT_HAVE_D_TYPE is
> defined and where configure decides to replace the libc glob with
> their GNU one.
>
> A patch something like this should work:
>
> - && d->d_type != DT_UNKNOWN && d->d_type != DT_DIR)
> + && d->d_type != DT_UNKNOWN && d->d_type != DT_DIR && d->d_type != DT_LNK)
>
> Or ideally configure could be convinced not to replace glob if they
> don't actually depend on weird gnu extensions.
>
> The bug manifests as broken $(wildcard ...) expansion whenever
> symlinks to dirs are involved in thr glob expression.
Filed upstream as:
https://savannah.gnu.org/bugs/index.php?53465
Rich
prev parent reply other threads:[~2018-03-25 17:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-13 17:18 Rich Felker
2018-03-25 17:12 ` 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=20180325171221.GF1436@brightrain.aerifal.cx \
--to=dalias@libc.org \
--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).