bugmake - Bugs: bug #33958, Segfault in a 'define' with sort,...


bug #33958: Segfault in a 'define' with sort, foreach and newlines...

Submitted by:  None
Submitted on:  Fri 05 Aug 2011 04:58:50 PM UTC  
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  Paul D. Smith <psmith> Open/Closed:  Closed
Component Version:  3.82 Operating System:  Any
Fixed Release:  4.0 Triage Status:  Verified

Add a New Comment (Rich Markup)

You are not logged in

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


Mon 12 Sep 2011 12:39:29 AM UTC, comment #2: 

I can reproduce this with GNU make 3.82 but not with CVS make so I'm declaring it fixed.  Thanks!

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Fri 05 Aug 2011 05:16:59 PM UTC, comment #1: 

I think the whitespace was preserved in the email to me.  I could certainly reproduce the problem using the snippet from the mail in 3.82.90.  But not in CVS.

Martin Dorey <mdorey>
Fri 05 Aug 2011 04:58:50 PM UTC, original submission:  


This Makefile segfault for me (make sure to put the space before $i) :
--- 8< ----- SEGFAULT --------------
define x
$(sort $(foreach i,1 2,

all:; echo $(strip $(call x))
--- 8< -----------------------------

If you remove the space before $i, or add a \ before the newline above, it's ok. This is 100% reproducible.

For instance this one is ok:
--- 8< ----- OK --------------------
define x
$(sort $(foreach i,1 2,

all:; echo $(strip $(call x))
--- 8< -----------------------------

So there's probably a bug somewhere?

Subsidiary question: is the faulty Makefile syntactically correct? (the absence of \ is ok according to my understanding of 'define', but maybe I'm wrong).

Anthony Mallet



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

Attach Files:

Attached Files
file #23749:  pipo.mk added by None (76B - application/octet-stream - Grr, the whitespace was not correctly kept. I attach the faulty makefile)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by mdorey (Posted a comment)

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

    Only logged-in users can vote.




    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-09-12 psmith StatusNone => Fixed
        Assigned toNone => psmith
        Open/ClosedOpen => Closed
        Fixed ReleaseNone => 4.0
        Triage StatusNone => Verified
    2011-08-05 None Attached File- => Added pipo.mk, #23749

    Back to the top

    Powered by Savane 3.6