This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2 1/2] posix: Add compat glob symbol to not follow dangling symbols
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: Szabolcs Nagy <szabolcs dot nagy at arm dot com>, libc-alpha at sourceware dot org
- Cc: nd at arm dot com
- Date: Tue, 19 Sep 2017 09:12:24 -0300
- Subject: Re: [PATCH v2 1/2] posix: Add compat glob symbol to not follow dangling symbols
- Authentication-results: sourceware.org; auth=none
- References: <1505745774-29303-1-git-send-email-adhemerval.zanella@linaro.org> <59C0FC08.2060407@arm.com>
On 19/09/2017 08:14, Szabolcs Nagy wrote:
> On 18/09/17 15:42, Adhemerval Zanella wrote:
>> Changes from previous version:
>>
>> * Fix alpha oldglob definition by making it also not follow dangling
>> symlinks.
>>
>> * Add powerpc64le abilist entries.
>>
>> * Increase _GNU_GLOB_INTERFACE_VERSION to 2 to advertive a new internal
>> glob semantic.
>>
>> ---
>>
>> This patch follows commit 5554304f0 (posix: Allow glob to match dangling
>> symlinks [BZ #866]) by adding a compat symbol that follow previous
>> semantic of not following dangling symlinks and thus avoiding call
>> gl_lstat with GLOB_ALTDIRFUNC.
>>
>> It avoids failure with old binaries that not set the alternate function
>> pointer for lstat (GNUmake for instance). The following scenario, for
>> instance, fails with current GNUmake because glibc will access unitialized
>> memory when calling gl_lstat:
>>
>
> i still think the original change should be reverted
> until there is a released version of make with the fix.
>
> build scripts will use a released version of make
> and the breakage will go unnoticed until make is
> run on the newly built system.
>
With this patch this scenario should not happen, either GNUmake will be
built against _GNU_GLOB_INTERFACE_VERSION equal to 1 and use the compat
symbol or use its own glob version for newer builds.
When GNUmake fixes its GLOB_ALTDIRFUNC usage it also should update the
config script to check for _GNU_GLOB_INTERFACE_VERSION to 1 and/or 2.