bugmake - Bugs: bug #1517, $(eval ...) behaves strangely

 
 

bug #1517: $(eval ...) behaves strangely

Submitted by:  Paul D. Smith <psmith>
Submitted on:  Fri 25 Oct 2002 09:34:39 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: 3.80Operating System: None
Fixed Release: 3.81Triage Status: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Thu 24 Mar 2005 02:37:08 AM UTC, comment #2:

I have been experiencing this problem and have tried the attached patch provided by psmith, however the patch did not solve the problem. When I applied the patch to make 3.80 it did not apply smoothly:

$ patch -p0 < ../eval-crash.diff
patching file variable.h
patching file expand.c
Hunk #1 succeeded at 564 (offset 19 lines).
patching file function.c
Hunk #1 succeeded at 1281 with fuzz 2 (offset 85 lines).

I'm running on AIX 5.2. Are there any other work arounds to this problem?

Craig Jeffree <jeffree>
Fri 25 Oct 2002 09:43:33 PM UTC, comment #1:

Greg was kind enough to send me a big chunk of his build environment to reproduce this bug, and I produced a fix based on that; I liked Toomas's fix but ended up keeping mine because there were subtle places Toomas's could fail.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Fri 25 Oct 2002 09:34:39 PM UTC, original submission:

Using $(eval ...) can lead to fatal errors about allocating too much memory, or it can evaluate to a value (the manual says it always evaluates to the empty string). See:

e0 = $(foreach s,foobar,$(eval $s:))
e1 = $(foreach s,foobar, $(eval $s:))

all: ; @echo e0 == $(e0) e1 == $(e1)

$ make
e0 == e1 == f

The e0 value is correct, but e1 is wrong.

Greg McGary reported the fatal memory allocation manifestation.

The above manifestation was reported by Toomas Rosin (and he provided a patch). It's the same bug but this one is easier to reproduce in a bug report :).

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #120:  eval-crash.diff added by psmith (2kB - application/octet-stream - Patch to fix eval buffer mismanagement.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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 4 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sat 01 Apr 2006 07:02:49 AM UTCpsmithFixed Release4.0=>3.81
Fri 25 Oct 2002 09:43:33 PM UTCpsmithStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)
  Fixed ReleaseNone=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup