bugmake - Bugs: bug #36844, Private variables can still leak...

 
 

bug #36844: Private variables can still leak to dependencies if += is used

Submitter:  Brian Vandenberg <phantal>
Submitted:  Fri 13 Jul 2012 06:15:20 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Duplicate Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  3.82 Operating System:  Any
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 10 Sep 2012 04:54:45 AM UTC, comment #7: 

Closed as a duplicate of bug #32872

Paul D. Smith <psmith>
Group administrator
Tue 17 Jul 2012 02:25:32 PM UTC, comment #6: 

3.83, that is.

Brian Vandenberg <phantal>
Tue 17 Jul 2012 02:25:19 PM UTC, comment #5: 

Is there a schedule for the planned release of 3.82?

Brian Vandenberg <phantal>
Tue 17 Jul 2012 02:24:22 PM UTC, comment #4: 

I agree.  This is a duplicate of the first bug.

Brian Vandenberg <phantal>
Tue 17 Jul 2012 10:32:44 AM UTC, comment #3: 

It's likely this bug is related to these bugs already fixed in CVS: bug #32872 bug #35468.  Have you tried the CVS version?

regards,
Rob.

Anonymous
Fri 13 Jul 2012 06:32:18 PM UTC, comment #2: 

... and one last mistake, though it's only a minor omission.

the global version of ASDF actually gets wiped out from the := assignment in the pattern rule.  Obviously that's expected behavior, and not a problem for me.

Brian Vandenberg <phantal>
Fri 13 Jul 2012 06:28:40 PM UTC, comment #1: 

In the original submission, I left out a couple of lines in the section exemplifying the problem; the variables 'T1' and 'T2' are there strictly for the sake of making it convenient to test this without having to modify the makefile for each test.

It should've read as follows:


To test this:


# Comment out lines 3 & 6-11; this will demonstrate how private variables should behave
gmake T1='#' T2='#'
C: global
B: global
A: global A1 A2
# Comment out just line 3; this will demonstrate the problem; targets B & C inherit changes from things that depend on them.
gmake T2='#'
C: global A1 A2 B1 B2 C1 C2
B: global A1 A2 B1 B2
A: global A1 A2
# Don't comment out any lines; adding a pattern rule to wipe out ASDF for all targets is a reasonable work-around until this problem gets fixed:
gmake
C: global C1 C2
B: global B1 B2
A: global A1 A2


Brian Vandenberg <phantal>
Fri 13 Jul 2012 06:15:20 PM UTC, original submission:  

01..ASDF := global
02..
03..${T2}%: private ASDF :=
04..
05..     A: private ASDF += A1
06..${T1}B: private ASDF += B1
07..${T1}C: private ASDF += C1
08..
09..${T1}C: private ASDF += C2
10..${T1}B: private ASDF += B2
11..${T1}A: private ASDF += A2
12..
13..A:B
14..B:C
15..
16..A B C:
17..  @echo "${@}: ${ASDF}"


To test this:

# Comment out lines 3 & 6-11; this will demonstrate how private variables should behave
gmake T1='#' T2='#'
C: global
B: global
A: global A1 A2
# Comment out just line 3; this will demonstrate the problem; targets B & C inherit changes from things that depend on them.
C: global A1 A2 B1 B2 C1 C2
B: global A1 A2 B1 B2
A: global A1 A2
# Don't comment out any lines; adding a pattern rule to wipe out ASDF for all targets is a reasonable work-around until this problem gets fixed:
gmake
C: global C1 C2
B: global B1 B2
A: global A1 A2

Brian Vandenberg <phantal>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

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 phantal (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-09-10 psmith StatusNone Duplicate
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code