Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 70598cb541edd989039ac6b036010ef1e0a2f19c
Ticket: 1789767fffffffffffffffffffffffffffffffff
Invalid free in Tcl core
User & Date: simps05192 on 2007-09-06 23:18:31
Changes

  1. assignee changed to: "hobbs"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    I checked out the latest Tcl out of CVS as of 2007-09-06 and then linked the following program against it:
    
    #include <tcl.h>
    
    int Tcl_AppInit(Tcl_Interp* interp)
    {
        if (Tcl_Init(interp) == TCL_ERROR) {
            return TCL_ERROR;
        }
    
        return TCL_OK;
    }
    
    int main(int argc, char* argv[])
    {
        Tcl_Main(argc, argv, Tcl_AppInit);
        return 0;
    }
    
    I then ran "valgrind --leak-check=full mytclsh" against it and I get the following spurious free:
    
    ==32498== Invalid free() / delete / delete[]
    ==32498==    at 0x43CF338: free (vg_replace_malloc.c:233)
    ==32498==    by 0x636A7BB: free_mem (in /lib/tls/libc-2.3.4.so)
    ==32498==    by 0x636A1E1: __libc_freeres (in /lib/tls/libc-2.3.4.so)
    ==32498==    by 0x43C6355: _vgnU_freeres (vg_preloaded.c:60)
    ==32498==    by 0x62EE903: _Exit (in /lib/tls/libc-2.3.4.so)
    ==32498==    by 0x4430661: Tcl_Exit (in /home/simpsons/tcl/unix/libtcl8.5.so)
    ==32498==    by 0x43FEC21: Tcl_ExitObjCmd (in /home/simpsons/tcl/unix/libtcl8.5.so)
    ==32498==    by 0x43F7233: TclEvalObjvInternal (in /home/simpsons/tcl/unix/libtcl8.5.so)
    ==32498==    by 0x4434C50: TclExecuteByteCode (in /home/simpsons/tcl/unix/libtcl8.5.so)
    ==32498==    by 0x443B6FE: TclCompEvalObj (in /home/simpsons/tcl/unix/libtcl8.5.so)
    ==32498==    by 0x43F873A: TclEvalObjEx (in /home/simpsons/tcl/unix/libtcl8.5.so)
    ==32498==    by 0x43F8A64: Tcl_EvalObjEx (in /home/simpsons/tcl/unix/libtcl8.5.so)
    ==32498==  Address 0x45C7008 is not stack'd, malloc'd or (recently) free'd
    
    
  4. foundin changed to: "obsolete: 8.5a7"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "simps05192"
  10. subsystem changed to: "41. Memory Allocation"
  11. title changed to: "Invalid free in Tcl core"
  12. type changed to: "Bug"