Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Sun, 25 Mar 2018 13:12:21 -0400
From: Rich Felker <>
Subject: Re: musl 1.1.19 exposes bug in GNU make

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:
> 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:


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.