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

 
 

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

Submitter:  Manoj Srivastava <srivasta>
Submitted:  Mon 15 Feb 2016 05:03:17 AM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Duplicate Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  3.82 Operating System:  POSIX-Based
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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 -email is 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 Files:
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-02-16 psmith StatusNone Duplicate
        Open/ClosedOpen Closed
    2016-02-15 srivasta Attached File- Added 0001-Fix-crash-when-default-goal-resolves-to-empty-becaus.patch, #36340
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code