From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12635 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: musl 1.1.19 exposes bug in GNU make Date: Sun, 25 Mar 2018 13:12:21 -0400 Message-ID: <20180325171221.GF1436@brightrain.aerifal.cx> References: <20180313171851.GA30854@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1521997838 5941 195.159.176.226 (25 Mar 2018 17:10:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 25 Mar 2018 17:10:38 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-12649-gllmg-musl=m.gmane.org@lists.openwall.com Sun Mar 25 19:10:34 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1f09A9-0001T7-Ln for gllmg-musl@m.gmane.org; Sun, 25 Mar 2018 19:10:33 +0200 Original-Received: (qmail 15418 invoked by uid 550); 25 Mar 2018 17:12:35 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 15375 invoked from network); 25 Mar 2018 17:12:34 -0000 Content-Disposition: inline In-Reply-To: <20180313171851.GA30854@brightrain.aerifal.cx> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:12635 Archived-At: 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