Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: cb2132be2f26b082b8c8310348a835f14174a45641be71b9a1ba00043e74fdaf
Ticket: 89fbf1f86e4935a146f30dcf3829f44e90a564d5
Unclean memory handling
User & Date: pointsman on 2023-08-31 00:27:18
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-plain"
  4. comment changed to:
    Recipt:
    
    - Build a Tcl 8.6.13 with CFLAGS -DPURIFY -g
    
    - Clone the tcllib fossil repository and check out trunk
    
    - Run in the tcllib check-out directoriy
    
    valgrind path/to/your/tclsh/from/above/tclsh8.6 sak.tcl test run foo
    
    This returns:
    
    ==2742752== LEAK SUMMARY:
    ==2742752==    definitely lost: 128 bytes in 4 blocks
    ==2742752==    indirectly lost: 956 bytes in 15 blocks
    ==2742752==      possibly lost: 0 bytes in 0 blocks
    ==2742752==    still reachable: 124,221 bytes in 28 blocks
    ==2742752==         suppressed: 0 bytes in 0 blocks
    
    
    Tcl 9 trunk with the same CFLAGS and with the tcllib branch
    tcl9-testarea-rde (tcllib trunk does not run with Tcl 9) there
    is a similiar result:
    
    ==2742854== LEAK SUMMARY:
    ==2742854==    definitely lost: 192 bytes in 5 blocks
    ==2742854==    indirectly lost: 1,230 bytes in 19 blocks
    ==2742854==      possibly lost: 0 bytes in 0 blocks
    ==2742854==    still reachable: 68,871 bytes in 25 blocks
    
    This must not be this way. With an according build Tcl 8.5.19:
    
    ==2742893==    definitely lost: 0 bytes in 0 blocks
    ==2742893==    indirectly lost: 0 bytes in 0 blocks
    ==2742893==      possibly lost: 447,970 bytes in 4,355 blocks
    ==2742893==    still reachable: 1,685,505 bytes in 20,355 blocks
    
    Even if what valgrind marks here as definitely lost is "harmless" in
    sense that it can't be exploited to an ever growing process this is
    nasty noise and hinders CI wrt memory checking.
    
  5. foundin changed to: "8.6, trunk"
  6. is_private changed to: "0"
  7. login: "pointsman"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "4ca203a8e925aecdd9419645f936bccf18cd6ea7"
  10. resolution changed to: "None"
  11. severity changed to: "Severe"
  12. status changed to: "Open"
  13. submitter changed to: "pointsman"
  14. subsystem changed to: "41. Memory Allocation"
  15. title changed to: "Unclean memory handling"
  16. type changed to: "Bug"