Skip to content
Tcl Source Code History Of Ticket 219066ffffffffff
Login

History Of Ticket 219066ffffffffff

Artifacts Associated With Ticket 219066ffffffffff

  1. Ticket change [1ace1b7c8f] (rid 123043) by nobody on 2000-10-26 01:10:06:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 4552 Bug
      Version: 8.2
      SubmitDate: '2000-03-24'
      LastModified: '2000-03-27'
      Severity: LOW
      Status: Released
      Submitter: techsupp
      ChangedBy: hobbs
      OS: Windows NT
      FixedDate: '2000-03-27'
      FixedInVersion: 8.3.1
      ClosedDate: '2000-10-25'
      
      
      Name:
      Kent Bloomstrand
      
      ReproducibleScript:
      The leak is not limited to only the TclPro library. I just ran 
      another test this morning against both the "tcl82.dll" that 
      ships with SS 5.0 and that of Tcl 8.2.3 and here is what I found:
      
      Beside the TclPro 1.3 tbcload leak problem, there is a definite leak 
      in the base "source" command not getting properly cleaned up after 
      TCL_DeleteInterp() is called. This happens with either the "tcl82.dll" 
      that ships with StoryServer 5.0 (w/ 5.0.1 QA-8 patch) or with the 
      Tcl 8.2.3 "tcl82.dll". I don't think we can allow leaks like this to 
      occur in our products. 
      
      In a simple test case, I run the program below to simulate a total 
      of 40000 calls to repeatedly "source" the same non-compiled TCL file 
      (with 600 simple procedures inside) and the total leak was about 10MB 
      on my NT box. 
      
      How to reproduce: 
      Compile and run the following C program (similar to the one from Step 3). 
      The file "d:/temp/plain.tcl" (cmd_2 in the following program) is the 
      same simple TCL file from Step 1 before with 600 simple procedures 
      such as 'proc ::ns::proc_a {} {return 1}': 
      
      int main(int argc, char* argv[]) 
      { 
          int i, j, status; 
          char *cmd_2 = "source {d:/temp/plain.tcl}"; 
          Tcl_Interp *interp; 
      
          interp = Tcl_CreateInterp(); 
          for (i = 0 ; i < 400 ; i++) { 
              printf("%d...", i); 
              for (j = 0 ; j < 100 ; j++) { 
                  printf("."); 
                  status = Tcl_GlobalEval(interp, cmd_2); 
                  if (status != TCL_OK) { 
                      printf("Source failed\n"); 
                      return 1; 
                  } 
              } 
              printf("\n"); 
          } 
          Tcl_DeleteInterp(interp); 
      
          printf("Hit RETURN when done..."); 
          getchar(); 
          return 0; 
      }
      
      ObservedBehavior:
      it leaks memory
      
      DesiredBehavior:
      it doesn't leak
      
      
      
      This turned out to be a "bug" in the provided script which never
      cleared the namespace export array (given the optional -clear
      argument).  8.3.1 has a fix to further improve this by checking
      for duplicates before adding to the export array. 
      -- 03/27/2000 hobbs
      
    4. foundin initialized to: "obsolete: 8.2"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "69. Other"
    10. title initialized to: "leak related to SOURCE command"
    11. type initialized to: "Bug"
  2. Ticket change [279c7ada6b] (rid 88548) by welch on 2000-10-26 08:34:07:

    1. closedate changed to: "2000-10-26T01:34:07"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [d7203b9e21] (rid 123927) by dgp on 2001-04-19 03:37:44:

    1. closedate changed to: "2001-04-18T20:37:44"
    2. closer changed to: "dgp"
    3. resolution changed to: "Invalid"
    4. subsystem changed to: "21. [namespace]"