Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: d5188397c5c131d5d4a5c3a48afb35f345e9cb80379cf55028e43f90bdd7fadb
Ticket: 89fbf1f86e4935a146f30dcf3829f44e90a564d5
Unclean memory handling
User & Date: apnadkarni on 2023-10-09 13:38:00
Changes

  1. icomment:
    I'm not sure the "reachable" warnings on an explicit exit can be treated as real leaks since the memory is still reachable as opposed to "definitely lost".
    
    Anyways, a little more detail on running Rolf's test:
    
    ```
    ==192368== HEAP SUMMARY:
    ==192368==     in use at exit: 70,279 bytes in 49 blocks
    ==192368==   total heap usage: 291,376 allocs, 291,327 frees, 30,779,604 bytes allocated
    ==192368==
    ==192368== 48 bytes in 2 blocks are definitely lost in loss record 26 of 38
    ==192368==    at 0x484182F: malloc (vg_replace_malloc.c:431)
    ==192368==    by 0x489210F: TclpAlloc (tclAlloc.c:699)
    ==192368==    by 0x48B0192: Tcl_Alloc (tclCkalloc.c:1038)
    ==192368==    by 0x48A31B9: TclArgumentEnter (tclBasic.c:5720)
    ==192368==    by 0x48A2B91: TclEvalEx (tclBasic.c:5454)
    ==192368==    by 0x49D7D92: Tcl_FSEvalFileEx (tclIOUtil.c:1783)
    ==192368==    by 0x49E9564: Tcl_MainEx (tclMain.c:412)
    ==192368==    by 0x4011C4: main (tclAppInit.c:94)
    ==192368==
    ==192368== 1,140 (96 direct, 1,044 indirect) bytes in 2 blocks are definitely lost in loss record 37 of 38
    ==192368==    at 0x484182F: malloc (vg_replace_malloc.c:431)
    ==192368==    by 0x489210F: TclpAlloc (tclAlloc.c:699)
    ==192368==    by 0x48B0192: Tcl_Alloc (tclCkalloc.c:1038)
    ==192368==    by 0x4A14360: Tcl_NewStringObj (tclStringObj.c:255)
    ==192368==    by 0x49FB4F9: TclSubstTokens (tclParse.c:2329)
    ==192368==    by 0x48A23FF: TclEvalEx (tclBasic.c:5332)
    ==192368==    by 0x49D7D92: Tcl_FSEvalFileEx (tclIOUtil.c:1783)
    ==192368==    by 0x49E9564: Tcl_MainEx (tclMain.c:412)
    ==192368==    by 0x4011C4: main (tclAppInit.c:94)
    ==192368==
    ==192368== LEAK SUMMARY:
    ==192368==    definitely lost: 144 bytes in 4 blocks
    ==192368==    indirectly lost: 1,044 bytes in 15 blocks
    ==192368==      possibly lost: 0 bytes in 0 blocks
    ==192368==    still reachable: 69,091 bytes in 30 blocks
    ==192368==         suppressed: 0 bytes in 0 blocks
    ==192368== Reachable blocks (those to which a pointer was found) are not shown.
    ==192368== To see them, rerun with: --leak-check=full --show-leak-kinds=all
    ==192368==
    ==192368== For lists of detected and suppressed errors, rerun with: -s
    ==192368== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
    ```
    
  2. login: "apnadkarni"
  3. mimetype: "text/x-markdown"