bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #47152] Fix crash when default goal resolves to empty because of an


From: Manoj Srivastava
Subject: [bug #47152] Fix crash when default goal resolves to empty because of an empty variable
Date: Mon, 15 Feb 2016 05:03:18 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?47152>

                 Summary: Fix crash when default goal resolves to empty
because of an  empty variable
                 Project: make
            Submitted by: srivasta
            Submitted on: Sun 14 Feb 2016 11:03:17 PM CST
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 3.82
        Operating System: POSIX-Based
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

Hi, 

This was reported by a debian user. Please retain a CC to
address@hidden 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



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sun 14 Feb 2016 11:03:17 PM CST  Name:
0001-Fix-crash-when-default-goal-resolves-to-empty-becaus.patch  Size: 1kB  
By: srivasta

<http://savannah.gnu.org/bugs/download.php?file_id=36340>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?47152>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]