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

 
 

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

Submitted by:  Brian Vandenberg <phantal>
Submitted on:  Fri 13 Jul 2012 06:15:20 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: DuplicatePrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 3.82Operating System: Any
Fixed Release: NoneTriage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission 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>
Project 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 File(s):
   
   
Comment:
   

No files currently attached

 

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 phantal (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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 10 Sep 2012 04:54:45 AM UTCpsmithStatusNone=>Duplicate
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1