bugmake - Bugs: bug #24588, $$(eval) with SECONDEXPANSION...

 
 

bug #24588: $$(eval) with SECONDEXPANSION causes segmentation faults

Submitted by:  Lars S. Jessen <ljessen>
Submitted on:  Fri 17 Oct 2008 08:53:14 AM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: 3.81Operating System: Any
Fixed Release: 3.82Triage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 04 Jun 2009 05:39:49 AM UTC, comment #3:

Fixed using a change almost identical to yours. Thanks!

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Mon 01 Jun 2009 11:15:25 AM UTC, comment #2:

See also duplicate bug #24622 for another example.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Fri 17 Oct 2008 10:55:40 AM UTC, comment #1:

Problem is caused by eval_buffer() assuming reading_file != NULL, this is not the case during the secondexpansion phase.
Solution: initialize ebuf.floc.filenm to NULL and only set ebuf.floc = *reading_file when reading_file != NULL.
See attached patch.

(file #16687)

Lars S. Jessen <ljessen>
Fri 17 Oct 2008 08:53:14 AM UTC, original submission:

$$(eval) with SECONDEXPANSION enabled causes make to crash with a segmentation fault.

The following, very simple, makefile reproduces the crash:

$ cat Makefile
.SECONDEXPANSION:

all : $$(eval $$(info test))

$ make
test
Segmentation fault

Lars S. Jessen <ljessen>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #16687:  fix24588.patch added by ljessen (729B - text/x-diff - Patch for read.c rev 1.169)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by psmith (Posted a comment)
  • -unavailable- added by ljessen (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 28 Jul 2010 06:16:59 AM UTCpsmithFixed Release4.0=>3.82
    Thu 04 Jun 2009 05:39:49 AM UTCpsmithStatusNone=>Fixed
      Assigned toNone=>psmith
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.0
    Fri 17 Oct 2008 10:55:40 AM UTCljessenAttached File-=>Added fix24588.patch, #16687

    Back to the top


    Powered by Savane 3.1-cleanup1