bugmake - Bugs: bug #25697, Segmentation fault setting...

 
 

bug #25697: Segmentation fault setting .DEFAULT_GOAL

Submitted by:  None
Submitted on:  Tue 24 Feb 2009 10:00:22 PM UTC  
Votes:  1  
 
Severity: 3 - NormalItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: 3.81Operating System: POSIX-Based
Fixed Release: 3.82Triage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 01 Jun 2009 02:29:00 AM UTC, comment #2:

The issue here is by doing this:

.DEFAULT_GOAL := $(myDefaultGoal) #restore the previous default rule

you are actually setting the .DEFAULT_GOAL variable to contain a single space rather than an empty string--make always preserves all TRAILING whitespace after a value, so any space between the value and a comment, for example, is included in the value.

Obviously make should not crash even so, and I've fixed this bug; now you'll get:

make: *** No targets. Stop.

I also noticed make wasn't expanding this variable before use, which is wrong. Fixed that too.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Wed 25 Feb 2009 02:16:34 AM UTC, comment #1:

Can reproduce with latest make from CVS. ns is null at the penultimate line:

2175 /* In case user set .DEFAULT_GOAL to a non-existent target
2176 name let's just enter this name into the table and let
2177 the standard logic sort it out. */
2178 if (default_goal_file == 0)
2179 {
2180 struct nameseq *ns;
2181 char p = default_goal_name;
2182
2183 ns = multi_glob (
2184 parse_file_seq (&p, '\0', sizeof (struct nameseq), 1),
2185 sizeof (struct nameseq));
2186
2187 /* .DEFAULT_GOAL should contain one target. */
2188 if (ns->next != 0)
2189 fatal (NILF, _(".DEFAULT_GOAL contains more than one target"));

Martin Dorey <mdorey>
Tue 24 Feb 2009 10:00:22 PM UTC, original submission:

The attached makefile causes a segmentation fault which seems to be due the line:

.DEFAULT_GOAL := $(myDefaultGoal)

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #17526:  test.mak added by None (233B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by psmith (Posted a comment)
  • -unavailable- added by jbezem (Voted in favor of this item)
  • -unavailable- added by mdorey (Posted a comment)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 28 Jul 2010 06:16:03 AM UTCpsmithFixed Release4.0=>3.82
    Mon 01 Jun 2009 02:29:00 AM UTCpsmithStatusNone=>Fixed
      Assigned toNone=>psmith
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.0
    Thu 16 Apr 2009 06:24:33 AM UTCjbezemCarbon-Copy-=>Added jbezem
    Tue 24 Feb 2009 10:00:23 PM UTCNoneAttached File-=>Added test.mak, #17526

    Back to the top


    Powered by Savane 3.1-cleanup1