Article View: gnu.utils.bug
Article #639bug in gnu-make
From: mkc
Date: Wed, 26 Aug 1992 19:54
Date: Wed, 26 Aug 1992 19:54
41 lines
1690 bytes
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)
------------------------------------------------------------------------------
Technical Details
Message-ID:
<9208261954.AA24074@stiletto>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!centerline.com!mkcShow Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!centerline.com!mkc From: mkc@centerline.com Subject: bug in gnu-make Message-ID: <9208261954.AA24074@stiletto> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Wed, 26 Aug 1992 19:54:04 GMT Approved: bug-gnu-utils@prep.ai.mit.edu Lines: 43