bugmake - Bugs: bug #47152, Fix crash when default goal...

 
 

bug #47152: Fix crash when default goal resolves to empty because of an empty variable

Submitted by:  Manoj Srivastava <srivasta>
Submitted on:  Mon 15 Feb 2016 05:03:17 AM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: DuplicatePrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 3.82Operating System: POSIX-Based
Fixed Release: NoneTriage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 15 Feb 2016 05:08:41 AM UTC, comment #1:

This seems to be fixed in the current version.

Manoj Srivastava <srivasta>
Mon 15 Feb 2016 05:03:17 AM UTC, original submission:

Hi,

This was reported by a debian user. Please retain a CC to -unavailable- so that the Debian BTS has a copy of your input. I (Manoj) have not been able to reproduce this, but th patch looks sane.

Running make against commit hash 1a4b795432 in
https://github.com/pastcompute/hdp15
after the antares/ subfolder had updated

The offending makefile is actually in https://github.com/pastcompute/antares

The following line, the last line in the Makefile causes the crash

.DEFAULT_GOAL := $(subst ",, $(CONFIG_MAKE_DEFTARGET))

I got a stack trace on line 2168 of main.c. ns (below) is a null pointer,

ns = multi_glob (
parse_file_seq (&p, '\0', sizeof (struct nameseq), 1),
sizeof (struct nameseq));

Line 2168:
if (ns->next != 0)
fatal (NILF, _(".DEFAULT_GOAL contains more than one target"));
default_goal_file = enter_file (ns->name);
ns->name = 0; /* It was reused by enter_file(). */
free_ns_chain (ns);

Interestingly the same error doesn't happen for me against
https://github.com/pastcompute/esp8266-frankenstein which uses exactly the same code in antares/ So I presume it is something to do with CONFIG_MAKE_DEFTARGET being empty and some edge case in parsing

Manoj

Manoj Srivastava <srivasta>

 

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

Attach File(s):
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by psmith (Updated the item)
  • -unavailable- added by srivasta (Submitted the item)
  • -unavailable- added by srivasta (Debian BTS)
  •  

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

    Only logged-in users can vote.

     

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

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 16 Feb 2016 07:46:18 PM UTCpsmithStatusNone=>Duplicate
      Open/ClosedOpen=>Closed
    Mon 15 Feb 2016 05:03:17 AM UTCsrivastaAttached File-=>Added 0001-Fix-crash-when-default-goal-resolves-to-empty-becaus.patch, #36340
      Carbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1