Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: dbc5588bde760b080a517c6b401db42edd8eda36
Ticket: 218837ffffffffffffffffffffffffffffffffff
Memory leaks in Tcl8.1.1
User & Date: nobody on 2000-10-26 01:06:23
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 2324 Bug
    Version: 8.1.1
    SubmitDate: '1999-07-06'
    LastModified: '1999-10-21'
    Severity: SER
    Status: Released
    Submitter: techsupp
    ChangedBy: hobbs
    OS: Solaris
    OSVersion: 5.6 with Sun Workshop Compiler C 4.2
    Machine: Other
    FixedDate: '1999-10-21'
    FixedInVersion: 8.2.2
    ClosedDate: '2000-10-25'
    
    
    Name:
    Prasad A. Chodavarapu
    
    Extensions:
    none
    
    CustomShell:
    none
    
    ReproducibleScript:
    We have run purify on our multi-thread application that contains
        embedded Tcl Interpreters. I am attaching relevant poryions of purify
        log that talk about memory leaks in Tcl.
    
    ObservedBehavior:
    MLK: 800 bytes leaked at 0x2dfc78
          * This memory was allocated from:
                malloc         [rtlib.o]
                Tcl_GetThreadData [tclLoadDl.c]
                Tcl_DeleteFileHandler [tclLoadDl.c]
                Tcl_ReadChars  [tclLoadDl.c]
                Tcl_EvalFile   [tclLoadDl.c]
                TclExecuteByteCode [tclLoadDl.c]
        
        MLK: 364 bytes leaked at 0x2b3360
          * This memory was allocated from:
                malloc         [rtlib.o]
                Tcl_GetThreadData [tclLoadDl.c]
                CompileRegexp  [tclRegexp.c]
                Tcl_GetRegExpFromObj [tclLoadDl.c]
                Tcl_RegexpObjCmd [tclLoadDl.c]
                TclExecuteByteCode [tclLoadDl.c]
        
        MLK: 240 bytes leaked in 2 blocks
          * This memory was allocated from:
                malloc         [rtlib.o]
                Tcl_CreateChannel [tclLoadDl.c]
                Tcl_MakeFileChannel [tclLoadDl.c]
                TclpGetDefaultStdChannel [tclLoadDl.c]
                Tcl_GetStdChannel [tclLoadDl.c]
                Tcl_GetChannel [tclLoadDl.c]
          * Block of 120 bytes (2 times); last block at 0x4cb528
        
        MLK: 120 bytes leaked at 0x2b1298
          * This memory was allocated from:
                malloc         [rtlib.o]
                Tcl_CreateChannel [tclLoadDl.c]
                Tcl_MakeFileChannel [tclLoadDl.c]
                TclpGetDefaultStdChannel [tclLoadDl.c]
                Tcl_GetStdChannel [tclLoadDl.c]
                GetChannelTable [tclIO.c]
        
        MLK: 4 bytes leaked at 0x2e10f8
          * This memory was allocated from:
                malloc         [rtlib.o]
                Tcl_GetThreadData [tclLoadDl.c]
                TclExecuteByteCode [tclLoadDl.c]
                Tcl_EvalObjEx  [tclLoadDl.c]
                TclObjInterpProc [tclLoadDl.c]
                TclExecuteByteCode [tclLoadDl.c]
        
        MLK: 4 bytes leaked at 0xc2a98
          * This memory was allocated from:
                malloc         [rtlib.o]
                Tcl_GetThreadData [tclLoadDl.c]
                TclpOpenFileChannel [tclLoadDl.c]
                Tcl_OpenFileChannel [tclLoadDl.c]
                OpenEncodingFile [tclEncoding.c]
                LoadEncodingFile [tclEncoding.c]
        
        PLK: 4704 bytes potentially leaked in 2 blocks
          * This memory was allocated from:
                malloc         [rtlib.o]
                TclReComp      [tclLoadDl.c]
                CompileRegexp  [tclRegexp.c]
                Tcl_GetRegExpFromObj [tclLoadDl.c]
                Tcl_RegexpObjCmd [tclLoadDl.c]
                TclExecuteByteCode [tclLoadDl.c]
          * Block of 2352 bytes (2 times); last block at 0x2c1d98
        
        MLK: 88 bytes leaked in 2 blocks
          * This memory was allocated from:
                malloc         [rtlib.o]
                CompileRegexp  [tclRegexp.c]
                Tcl_GetRegExpFromObj [tclLoadDl.c]
                Tcl_RegexpObjCmd [tclLoadDl.c]
                TclExecuteByteCode [tclLoadDl.c]
                Tcl_EvalObjEx  [tclLoadDl.c]
          * Block of 44 bytes (2 times); last block at 0x2b35b0
        
        MLK: 84 bytes leaked in 3 blocks
          * This memory was allocated from:
                malloc         [rtlib.o]
                Tcl_GetThreadData [tclLoadDl.c]
                InitTimer      [tclTimer.c]
                Tcl_DeleteTimerHandler [tclLoadDl.c]
                CloseChannel   [tclIO.c]
                FlushChannel   [tclIO.c]
          * Block of 28 bytes (3 times); last block at 0x2c9a48
        
        MLK: 64 bytes leaked in 2 blocks
          * This memory was allocated from:
                malloc         [rtlib.o]
                Tcl_GetThreadData [tclLoadDl.c]
                Tcl_CreateChannel [tclLoadDl.c]
                TclpOpenFileChannel [tclLoadDl.c]
                Tcl_OpenFileChannel [tclLoadDl.c]
                Tcl_EvalFile   [tclLoadDl.c]
          * Block of 32 bytes (2 times); last block at 0x2c8ce0
        
        MLK: 36 bytes leaked in 3 blocks
          * This memory was allocated from:
                malloc         [rtlib.o]
                Tcl_CreateThreadExitHandler [tclLoadDl.c]
                InitTimer      [tclTimer.c]
                Tcl_DeleteTimerHandler [tclLoadDl.c]
                CloseChannel   [tclIO.c]
                FlushChannel   [tclIO.c]
          * Block of 12 bytes (3 times); last block at 0x2b0458
        
        MLK: 32 bytes leaked at 0x60b8c0
          * This memory was allocated from:
                malloc         [rtlib.o]
                Tcl_GetThreadData [tclLoadDl.c]
                Tcl_GetStdChannel [tclLoadDl.c]
                Tcl_GetChannel [tclLoadDl.c]
                Tcl_PutsObjCmd [tclLoadDl.c]
                TclExecuteByteCode [tclLoadDl.c]
        
        MLK: 32 bytes leaked in 2 blocks
          * This memory was allocated from:
                malloc         [rtlib.o]
                Tcl_MakeFileChannel [tclLoadDl.c]
                TclpGetDefaultStdChannel [tclLoadDl.c]
                Tcl_GetStdChannel [tclLoadDl.c]
                Tcl_GetChannel [tclLoadDl.c]
                Tcl_PutsObjCmd [tclLoadDl.c]
          * Block of 16 bytes (2 times); last block at 0x53d2d8
        
        MLK: 32 bytes leaked at 0xc14d0
          * This memory was allocated from:
                malloc         [rtlib.o]
                _alloc_attr    [libthread.so.1]
                pthread_attr_init [libthread.so.1]
                TclpThreadCreate [tclLoadDl.c]
                Tcl_InitNotifier [tclLoadDl.c]
                TclInitNotifier [tclLoadDl.c]
        
        MLK: 32 bytes leaked at 0xc0838
          * This memory was allocated from:
                malloc         [rtlib.o]
                Tcl_GetThreadData [tclLoadDl.c]
                TclInitSubsystems [tclLoadDl.c]
                Tcl_FindExecutable [tclLoadDl.c]
        
        MLK: 16 bytes leaked at 0x2b10f8
          * This memory was allocated from:
                malloc         [rtlib.o]
                Tcl_MakeFileChannel [tclLoadDl.c]
                TclpGetDefaultStdChannel [tclLoadDl.c]
                Tcl_GetStdChannel [tclLoadDl.c]
                GetChannelTable [tclIO.c]
                Tcl_RegisterChannel [tclLoadDl.c]
        
        MLK: 12 bytes leaked at 0x230120
          * This memory was allocated from:
                malloc         [rtlib.o]
                Tcl_CreateThreadExitHandler [tclLoadDl.c]
                CompileRegexp  [tclRegexp.c]
                Tcl_GetRegExpFromObj [tclLoadDl.c]
                Tcl_RegexpObjCmd [tclLoadDl.c]
                TclExecuteByteCode [tclLoadDl.c]
        
        MLK: 8 bytes leaked at 0x261c98
          * This memory was allocated from:
                malloc         [rtlib.o]
                Tcl_GetThreadData [tclLoadDl.c]
                TclInitSubsystems [tclLoadDl.c]
                Tcl_CreateInterp [tclLoadDl.c]
        
        MLK: 8 bytes leaked at 0x2c8c70
          * This memory was allocated from:
                malloc         [rtlib.o]
                Tcl_GetThreadData [tclLoadDl.c]
                TclInExit      [tclLoadDl.c]
                FileCloseProc  [tclUnixChan.c]
                CloseChannel   [tclIO.c]
                FlushChannel   [tclIO.c]
        
        MLK: 8 bytes leaked in 2 blocks
          * This memory was allocated from:
                malloc         [rtlib.o]
                Tcl_GetThreadData [tclLoadDl.c]
                TclpOpenFileChannel [tclLoadDl.c]
                Tcl_OpenFileChannel [tclLoadDl.c]
                Tcl_EvalFile   [tclLoadDl.c]
                TclExecuteByteCode [tclLoadDl.c]
          * Block of 4 bytes (2 times); last block at 0x2ad238
        
        PLK: 4144 bytes potentially leaked at 0x2e1430
          * This memory was allocated from:
                malloc         [rtlib.o]
                AllocChannelBuffer [tclIO.c]
                WriteChars     [tclIO.c]
                Tcl_WriteObj   [tclLoadDl.c]
                Tcl_PutsObjCmd [tclLoadDl.c]
                TclExecuteByteCode [tclLoadDl.c]
        
        PLK: 52 bytes potentially leaked at 0x2dfff0
          * This memory was allocated from:
                malloc         [rtlib.o]
                Tcl_GetThreadData [tclLoadDl.c]
                Tcl_CreateEventSource [tclLoadDl.c]
                InitTimer      [tclTimer.c]
                Tcl_DeleteTimerHandler [tclLoadDl.c]
                CloseChannel   [tclIO.c]
    
    DesiredBehavior:
    Some of these leaks might be OK, in that they might be one time things.
        Others might not be so. Also, since Tcl manages its own memory pool, if
        any tricks ar ebeing used, purify might be flustered with those. still,
        these are worth looking into.
    
    
    
    I have just finished purifying Tcl on Solaris, and it can now
    run through the test suite, threaded or non-threaded, without
    a single leak. 
    -- 10/21/1999 hobbs
    
  4. foundin changed to: "final: 8.1.1"
  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: "Memory leaks in Tcl8.1.1"
  11. type changed to: "Bug"