bug-make
[Top][All Lists]
Advanced

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

[bug #20033] parallel (-j2) make with $(eval) construct segfaults


From: anonymous
Subject: [bug #20033] parallel (-j2) make with $(eval) construct segfaults
Date: Fri, 01 Jun 2007 10:48:43 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061206 Firefox/1.5.0.9

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

                 Summary: parallel (-j2) make with $(eval) construct
segfaults
                 Project: make
            Submitted by: None
            Submitted on: Friday 06/01/2007 at 10:48 UTC
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 3.81
        Operating System: POSIX-Based
           Fixed Release: None

    _______________________________________________________

Details:

Hello,

At work I have a (proprietary, sorry) makefile where I use an $(eval)
construct. It goes like

foo: bar
        $(eval CHECKSUM := $(word 1,$(shell cat $^ | sha1sum))) $(if
$(wildcard $(CACHEDIR)/$(CHECKSUM)), $(call do-copy,$(CHECKSUM)), $(call
do-dct4-selection,$(CHECKSUM)))

This runs nicely with a plain make but if I try make -j2 I get a segfault. I
have captured this in gdb, output below


(gdb) bt
#0  eval_buffer (
    buffer=0x819abb8 "CHECKSUM := ac2773ef9cb98feab91b3ddfeedc20019d1516c3")
    at read.c:430
#1  0x08050012 in func_eval (o=0x819aae9 "[\230[", argv=0x0,
    funcname=0x8062e38 "eval") at function.c:1369
#2  0x080506a8 in expand_builtin_function (o=0x819aae9 "[\230[",
    argc=135900088, argv=0xfeffa8b0, entry_p=0xffffffca) at function.c:2115
#3  0x08050819 in handle_function (op=0xfeffa944, stringp=0x818ea38)
    at function.c:2213
#4  0x0804c630 in variable_expand_string (line=0x0,
    string=0x818ea00 "\t$(eval CHECKSUM := $(word 1,$(shell cat $^ |
sha1sum))) $(if $(wildcard $(CACHEDIR)/$(CHECKSUM)), $(call
do-copy,$(CHECKSUM)), $(call do-dct4-selection,$(CHECKSUM)))", length=-1) at
expand.c:253
#5  0x0804c9a6 in variable_expand (
    line=0x818ea00 "\t$(eval CHECKSUM := $(word 1,$(shell cat $^ | sha1sum)))
$(if $(wildcard $(CACHEDIR)/$(CHECKSUM)), $(call do-copy,$(CHECKSUM)), $(call
do-dct4-selection,$(CHECKSUM)))") at expand.c:418
#6  0x0804ca40 in variable_expand_for_file (
    line=0xffffffca <Address 0xffffffca out of bounds>, file=0x819abb8)
    at expand.c:463
#7  0x0804cc15 in allocated_variable_expand_for_file (
    line=0x818ea00 "\t$(eval CHECKSUM := $(word 1,$(shell cat $^ | sha1sum)))
$(if $(wildcard $(CACHEDIR)/$(CHECKSUM)), $(call do-copy,$(CHECKSUM)), $(call
do-dct4-selection,$(CHECKSUM)))", file=0x80725b8) at expand.c:548
#8  0x08053319 in new_job (file=0x80725b8) at job.c:1600
#9  0x0805c28a in update_file_1 (file=0x80725b8, depth=0) at remake.c:761
#10 0x0805b984 in update_file (file=0x80725b8, depth=0) at remake.c:307
#11 0x0805b63f in update_goal_chain (goals=0x80ba8d8) at remake.c:154
#12 0x080551a2 in main (argc=7, argv=0xfeffc454, envp=0xfeffc474)
    at main.c:2198
(gdb) print reading_file
$1 = (const struct floc *) 0x0

line 430 at read.c:

  ebuf.floc = *reading_file;

So we try to dereference a NULL pointer here. As stated this is make 3.81. 

I hope this is of help, otherwise I'll try to provide more information.

Cheers,
  Rasmus




    _______________________________________________________

Reply to this item at:

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

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





reply via email to

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