🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by mkc Wed, 26 Aug 1992 19:54
bug in gnu-make
#639
Author: mkc
Date: Wed, 26 Aug 1992 19:54
41 lines
1690 bytes
Gnu make version make-3.62.

On HP700s (untested on other machines)

When I tried to invoke gmake with a Makefile that has a rule of the
form:

> target: $(SOME_MAKE_VARIABLE)

For some reason this triggers a call to glob() with the pattern
parameter "/".  When glob is called with this pattern, an
infinite loop results as glob calls itself with the same pattern.

The parsing of pattern into filename and dirname results in
filename = "", and dirname = "/", and then this code is reached:

>  if (filename[0] == '\0')
>    /* "pattern/".  Expand "pattern", appending slashes.  */
>    return glob(dirname, flags | GLOB_MARK, errfunc, pglob);


I believe changing this to be:

>  if (filename[0] == '\0' && strcmp(dirname, "/"))

fixes the problem.

It seems that glob/glob.c is shared with other Gnu programs.


Mark Culotta

------------------------------------------------------------------------------

        Mark Culotta                  |       mkc@centerline.com or
        Software Engineer             |       uunet!centerline!mkc
        CenterLine Software Inc.      |
        10 Fawcett St.                |       (617) 498-3311 (voice)
        Cambridge, MA 02138-1110      |       (617) 868-6655 (FAX)

------------------------------------------------------------------------------
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads