From: SourceForge.net <no...@so...> - 2007-09-07 20:50:21
|
Bugs item #1789767, was opened at 2007-09-06 20:18 Message generated for change (Comment added) made by msofer You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1789767&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 40. Memory Allocation Group: development: 8.5a7 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Scott Simpson (simps05192) Assigned to: Jeffrey Hobbs (hobbs) Summary: Invalid free in Tcl core Initial Comment: 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 ---------------------------------------------------------------------- >Comment By: miguel sofer (msofer) Date: 2007-09-07 17:50 Message: Logged In: YES user_id=148712 Originator: NO This looks like a problem in libc's exit(), not in Tcl. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1789767&group_id=10894 |