bugmake - Bugs: bug #52018, suggestion: test case for glob...


bug #52018: suggestion: test case for glob with dangling symlink

Submitted by:  Paul Eggert <eggert>
Submitted on:  Thu 14 Sep 2017 02:07:30 PM UTC  
Severity:  3 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  Paul D. Smith <psmith> Open/Closed:  Closed
Component Version:  None Operating System:  POSIX-Based
Fixed Release:  4.3 Triage Status:  Small Effort

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sun 05 Aug 2018 12:24:37 PM UTC, comment #5: 

I added a test as suggested below.  I can't say whether it really tests the problem case but it's not a bad test to have anyway.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Sun 24 Sep 2017 10:54:09 PM UTC, comment #4: 

You'd have to run bleeding-edge-from-git glibc to get the new behavior, or copy glob.c from bleeding-edge Gnulib and use that instead of glibc glob.

The new implementation will use gl_lstat when testing for existence, and will use gl_stat only when testing for directories. However, you shouldn't assume this; e.g., the implementation is free to use only gl_lstat if it wants to.

Your idea for a test case sounds good.

Paul Eggert <eggert>
Sun 24 Sep 2017 01:53:14 PM UTC, comment #3: 

Hm, well, I don't have a newer glibc and I don't know how the newer glob will utilize the gl_lstat element, so I don't know exactly what the test needs to do in order to stress this.  Do I just need to get the wildcard function to expand a symlink which doesn't point to a real file?  I wrote a test like that but of course it succeeds for me with my glibc, even before the changes to make's dir.c.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Sat 23 Sep 2017 09:18:21 PM UTC, comment #2: 

Heh, I guess it's in the title and I only read the problem description :).

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Sat 23 Sep 2017 09:17:45 PM UTC, comment #1: 

Can you clarify what the usage is that is not being tested?  You mean, obtaining timestamps from dangling symlinks?

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Thu 14 Sep 2017 02:07:30 PM UTC, original submission:  

This message follows up on my recent bug report "Do not assume glibc glob internals" <http://lists.gnu.org/archive/html/bug-make/2017-09/msg00014.html>.

In later discussion on libc-alpha, Adhemerval Zanella noted "make tests itself does not trigger ... this issue (running make tests with a newer glibc shows no regression), so it would be good also if make adds a newer tests to stress it." See:


This is a good suggestion so I thought I'd pass it along. It'll require 'make' to upgrade to a recent Gnulib version of glob.c, which is a good thing for other reasons (we've been fixing some bugs and are likely to fix more soon).

Paul Eggert <eggert>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by eggert (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-08-05 psmith StatusNone => Fixed
        Assigned toNone => psmith
        Open/ClosedOpen => Closed
        Operating SystemNone => POSIX-Based
        Fixed ReleaseNone => 4.3
        Triage StatusNone => Small Effort

    Back to the top

    Powered by Savane 3.7