From: Boris Kolpackov Date: Tue, 1 Mar 2005 08:01:05 +0000 (+0000) Subject: Fixed Savannah bug #12180. X-Git-Tag: 3.81~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0759af440a1d721f0248b2ea83fe0ad8a1c19cfb;p=thirdparty%2Fmake.git Fixed Savannah bug #12180. --- diff --git a/ChangeLog b/ChangeLog index b9f4ad74..b0b25dcd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Mar 1 10:12:20 2005 Boris Kolpackov + + * read.c (record_files): Add a check for the list of prerequisites + of a static pattern rule being empty. Fixes Savannah bug #12180. + 2005-02-28 Paul D. Smith * doc/make.texi (Text Functions): Update docs to allow the end diff --git a/read.c b/read.c index d235c6aa..4103555a 100644 --- a/read.c +++ b/read.c @@ -1915,7 +1915,7 @@ record_files (struct nameseq *filenames, char *pattern, char *pattern_percent, the target pattern, the target's name and the dependencies' patterns into plain dependency names. */ - if (find_percent (this->name) != 0) + if (this != 0 && find_percent (this->name) != 0) { PATH_VAR (stem); char *o; diff --git a/tests/ChangeLog b/tests/ChangeLog index 19793243..2c589006 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +Tue Mar 1 10:15:25 2005 Boris Kolpackov + + * tests/scripts/features/statipattrules: Add a test for + Savannah bug #12180. + 2005-02-28 Paul D. Smith * scripts/options/dash-q: Add a test for Savannah bug # 7144. diff --git a/tests/scripts/features/statipattrules b/tests/scripts/features/statipattrules index 29a7c08c..7d35ec3a 100644 --- a/tests/scripts/features/statipattrules +++ b/tests/scripts/features/statipattrules @@ -62,11 +62,15 @@ close(MAKEFILE); $answer = "$makefile2:1: *** target `foo' leaves prerequisite pattern empty. Stop.\n"; &compare_output($answer, &get_logfile(1)); +# TEST #5 -- bug #12180: core dump on a stat pattern rule with an empty +# prerequisite list. +# +run_make_test(' +foo.x bar.x: %.x : ; @echo $@ -1; - - - - - +', +'', +'foo.x +'); +1;