Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 14ec51bcaf27e50381bcfc05de59b1dc0c9fe90b
Ticket: a3309d01dbb0f23c3cf717ace30d9663fa54735f
Leak in array when unsetting keys from a proc
User & Date: bovine on 2015-07-15 22:50:54
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    I've discovered a memory leak in Tcl 8.6.4 on FreeBSD 9.1 and 10.1 with the following script. The leak does not occur under Tcl 8.5
    
    https://gist.github.com/bovine/15c350d044325a93d5cb
    
    The issue seems to be specific to using lists that are built up using "lappend". If $foo is using a list that is directly "set" in a single operation, then the leak does not appear to occur.
    
    Additionally, the leak occurs when using "unset" to remove individual elements from myarray. If you "array unset myarray" entirely, then the memory seems to be properly freed.
    
  5. foundin changed to: "8.6.4"
  6. is_private changed to: "0"
  7. login: "bovine"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "f0e2312a244c99b69b66ff52a743015292c5af63"
  10. resolution changed to: "None"
  11. severity changed to: "Severe"
  12. status changed to: "Open"
  13. submitter changed to: "bovine"
  14. subsystem changed to: "14. List Object"
  15. title changed to: "Leak in array when using generated lists as keys"
  16. type changed to: "Bug"