Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e1aaec37b3a79939faf2bb5624d917314d33f513
Ticket: 218020ffffffffffffffffffffffffffffffffff
unable to append to a value of env
User & Date: nobody on 2000-10-26 00:52:15
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 1135 Bug
    Version: 8.0.3
    SubmitDate: '1999-02-02'
    LastModified: '1999-04-16'
    Severity: MED
    Status: Closed
    Submitter: welch
    ChangedBy: rjohnson
    OS: Windows NT
    OSVersion: 4.0
    Machine: X86
    FixedDate: '2000-10-25'
    ClosedDate: '1999-04-16'
    
    
    Name:
    Kirk Augustin
    
    Extensions:
    Aim
    
    CustomShell:
    lots
    
    ReproducibleScript:
    append env(TMP) "xxx"
    
    # where TMP is any valid env entry, and "xxx" is any string.
    
    ObservedBehavior:
    # You get a Purify error, and 
    puts $env(TMP) 
    # is garbage
    
    DesiredBehavior:
    obvious
    
    Patch:
    # in file generic\tclEnv.c, function TclSetEnv, move
        /*
         * Update all of the interpreters.
         */
    
        for (eiPtr= firstInterpPtr; eiPtr != NULL; eiPtr = eiPtr->nextPtr) {
    (void) Tcl_SetVar2(eiPtr->interp, "env", (char *) name,
    (char *) value, TCL_GLOBAL_ONLY);
        }
    # To the end of the function, AFTER the env entry for the local interpreter is 
    # appended.  This prevents the env trace in other interpeters from going cyclic.
    
    PatchFiles:
    # file: generic\tclEnv.c
    # function: TclSetEnv()
    
    
    
    The old code tried to update the other interpreters before updating its own interpreter env, but each interpreter fired traces and caused an endless cycle, until memory was corrupted.
    
    This works in 8.1.  Closing this bug.  04/16/1999 18:31 - rjohnson -
    
    
    
  4. foundin changed to: "obsolete: 8.0.3"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "unable to append to a value of env"
  11. type changed to: "Bug"