1
0
mirror of https://github.com/mirror/make.git synced 2025-03-31 14:40:30 +08:00

Fix a potential core dump when merging aliases. Might fix bug .

Revert intermediate file free code.
Suppress some warnings in VMS builds.
This commit is contained in:
Paul Smith 2006-02-21 05:21:19 +00:00
parent 08bfd86103
commit 8af9389f87
4 changed files with 24 additions and 16 deletions

View File

@ -1,3 +1,8 @@
2006-02-20 Paul D. Smith <psmith@gnu.org>
* variable.c (merge_variable_set_lists): It's legal for *setlist0
to be null; don't core in that case.
2006-02-19 Paul D. Smith <psmith@gnu.org>
* commands.c (set_file_variables): Realloc, not malloc, the static

View File

@ -80,19 +80,21 @@ static void
free_idep_chain (struct idep *p)
{
struct idep *n;
struct file *f;
for (; p != 0; p = n)
{
n = p->next;
if (p->name)
free (p->name);
{
struct file *f = p->intermediate_file;
f = p->intermediate_file;
if (f != 0
&& (f->stem < f->name || f->stem > f->name + strlen (f->name)))
free (f->stem);
if (f != 0
&& (f->stem < f->name || f->stem > f->name + strlen (f->name)))
free (f->stem);
free (p->name);
}
free (p);
}
@ -836,7 +838,7 @@ pattern_search (struct file *file, int archive,
f->deps = imf->deps;
f->cmds = imf->cmds;
f->stem = xstrdup (imf->stem);
f->stem = imf->stem;
f->also_make = imf->also_make;
f->is_target = 1;

View File

@ -32,7 +32,7 @@ CP = copy
#
ifeq ($(CC),cc)
CFLAGS = $(defines) /include=([],[.glob])/prefix=(all,except=(glob,globfree))/standard=relaxed
CFLAGS = $(defines) /include=([],[.glob])/prefix=(all,except=(glob,globfree))/standard=relaxed/warn=(disable=questcompare)
else
CFLAGS = $(defines) /include=([],[.glob])
endif

View File

@ -674,16 +674,17 @@ merge_variable_set_lists (struct variable_set_list **setlist0,
/* This loop relies on the fact that all setlists terminate with the global
setlist (before NULL). If that's not true, arguably we SHOULD die. */
while (setlist1 != &global_setlist && to != &global_setlist)
{
struct variable_set_list *from = setlist1;
setlist1 = setlist1->next;
if (to)
while (setlist1 != &global_setlist && to != &global_setlist)
{
struct variable_set_list *from = setlist1;
setlist1 = setlist1->next;
merge_variable_sets (to->set, from->set);
merge_variable_sets (to->set, from->set);
last0 = to;
to = to->next;
}
last0 = to;
to = to->next;
}
if (setlist1 != &global_setlist)
{