Skip to content
Tcl Source Code History Of Ticket 733126ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 733126ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 733126ffffffffffffffffffffffffffffffffff

  1. Ticket change [7d904fb6e8] (rid 97260) by nobody on 2003-05-06 07:44:49:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      I am using TCL 8.3.1. Recently when I was trying to corner a memory leak 
      issue it was found that the leak was occurring in the TCL library while 
      creating and deleting interpreters. The following is the stack traces
      of the leak from purify.
      
      Platform : Solaris 2.8
      
      
      >>>>
      MLK: 512 bytes leaked in 16 blocks
        * This memory was allocated from:
              malloc         [rtlib.o]
              TclpAlloc      [tclAlloc.c:671]
              Tcl_Alloc      [tclCkalloc.c:846]
              Tcl_GetThreadData [tclThread.c:101]
              Tcl_CreateChannel [tclIO.c:937]
              TclpOpenFileChannel [tclUnixChan.c:1375]
        * Block of 32 bytes (16 times); last block at 0xdbcd38
      
      MLK: 476 bytes leaked in 17 blocks
        * This memory was allocated from:
              malloc         [rtlib.o]
              TclpAlloc      [tclAlloc.c:671]
              Tcl_Alloc      [tclCkalloc.c:846]
              Tcl_GetThreadData [tclThread.c:101]
              InitTimer      [tclTimer.c:158]
              Tcl_DeleteTimerHandler [tclTimer.c:296]
        * Block of 28 bytes (17 times); last block at 0xddd3e8
      
      MLK: 340 bytes leaked in 17 blocks
        * This memory was allocated from:
              malloc         [rtlib.o]
              TclpAlloc      [tclAlloc.c:671]
              Tcl_Alloc      [tclCkalloc.c:846]
              Tcl_GetThreadData [tclThread.c:101]
              Tcl_AsyncReady [tclAsync.c:331]
              EvalObjv       [tclParse.c:934]
        * Block of 20 bytes (17 times); last block at 0xdf3980
      
      MLK: 204 bytes leaked in 17 blocks
        * This memory was allocated from:
              malloc         [rtlib.o]
              TclpAlloc      [tclAlloc.c:671]
              Tcl_Alloc      [tclCkalloc.c:846]
              Tcl_CreateThreadExitHandler [tclEvent.c:493]
              InitTimer      [tclTimer.c:160]
              Tcl_DeleteTimerHandler [tclTimer.c:296]
        * Block of 12 bytes (17 times); last block at 0xdf3430
      
      MLK: 204 bytes leaked in 17 blocks
        * This memory was allocated from:
              malloc         [rtlib.o]
              TclpAlloc      [tclAlloc.c:671]
              Tcl_Alloc      [tclCkalloc.c:846]
              Tcl_GetThreadData [tclThread.c:101]
              TclInitSubsystems [tclEvent.c:738]
              Tcl_CreateInterp [tclBasic.c:281]
        * Block of 12 bytes (17 times); last block at 0xdb0d30
      
      MLK: 68 bytes leaked in 17 blocks
        * This memory was allocated from:
              malloc         [rtlib.o]
              TclpAlloc      [tclAlloc.c:671]
              Tcl_Alloc      [tclCkalloc.c:846]
              Tcl_GetThreadData [tclThread.c:101]
              TclpOpenFileChannel [tclUnixChan.c:1296]
              Tcl_OpenFileChannel [tclIOUtil.c:556]
        * Block of 4 bytes (17 times); last block at 0xcec828
      
      MLK: 32 bytes leaked at 0xcc4ed0
        * This memory was allocated from:
              malloc         [rtlib.o]
              TclpAlloc      [tclAlloc.c:671]
              Tcl_Alloc      [tclCkalloc.c:846]
              Tcl_GetThreadData [tclThread.c:101]
              TclInitIOSubsystem [tclIO.c:161]
              TclInitSubsystems [tclEvent.c:724]
      
      
      <<<<
      
      
      
    4. foundin initialized to: "obsolete: 8.3.1"
    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: "None"
    10. title initialized to:
      Memory leak while creating and deleting interpreters
      
    11. type initialized to: "Bug"
  2. Ticket change [c180e76939] (rid 111330) by hobbs on 2003-05-06 15:57:10:

    1. closedate changed to: "2003-05-06T08:57:10"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      Please verify with latest Tcl before reporting.
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. resolution changed to: "Out of Date"
    7. status changed to: "Pending"
    8. username: "hobbs"
  3. Ticket change [7700f8e260] (rid 105690) by kdina2001 on 2003-05-06 22:53:47:

    1. icomment:
      Logged In: YES 
      user_id=772890
      
      I tested with the latest version as well. That is 8.3.5. The issue seems to be present in 
      this version as well. I was able to fix this by doing something as follows. But am not 
      sure if that affects anything else. Can you please let me know if there is a better fix
      available ?
      
      File : unix/tclUnixChan.c :
      ==================
      static int  FileCloseProc(instanceData, interp)
          ClientData instanceData;/* File state. */
          Tcl_Interp *interp;/* For error reporting - unused. */
      {
          FileState *fsPtr = (FileState *) instanceData;
          FileState **nextPtrPtr;
          int errorCode = 0;
          ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
      
          [ -- snip -- ]
      
          for (nextPtrPtr = &(tsdPtr->firstFilePtr); (*nextPtrPtr) != NULL;
       nextPtrPtr = &((*nextPtrPtr)->nextPtr)) {
      if ((*nextPtrPtr) == fsPtr) {
          (*nextPtrPtr) = fsPtr->nextPtr;
          break;
      }
          }
          ckfree((char *) fsPtr);
      
          /*Added the following to free the allocation made for tsd*/
          if(tsdPtr->firstFilePtr == NULL){
             /* List is empty, free the head */
             ckfree( tsdPtr );
          }
      
          return errorCode;
      }
      
      
      
    2. login: "kdina2001"
    3. mimetype: "text/plain"
    4. username: "kdina2001"
  4. Ticket change [8e88cc41ba] (rid 120122) by dgp on 2003-05-07 02:45:13:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      No, the latest version is Tcl 8.4.2.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. status changed to: "Open"
    5. username: "dgp"
  5. Ticket change [9c48877370] (rid 96124) by hobbs on 2003-05-11 07:00:42:

    1. assignee changed to: "andreas_kupries"
    2. icomment:
      Logged In: YES 
      user_id=72656
      
      The poster indicates TSD in tclUnixChan.c.
      
      
    3. login: "hobbs"
    4. mimetype: "text/plain"
    5. priority changed to: "7 High"
    6. username: "hobbs"
  6. Ticket change [371912da14] (rid 107220) by andreas_kupries on 2004-07-17 03:20:32:

    1. closedate changed to: "2004-07-16T20:20:32"
    2. closer changed to: "andreas_kupries"
    3. status changed to: "Closed"