Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 04984cf2a99343ede2ed1eab1f98885b5381c1511e8b7d9f592c56b46aab2939
Ticket: 6525391072cf1e8e8fdc04084a5856adc9bfcc3c
TclObjTest_Init leaks when Tcltest is initialized twice in an interpreter
User & Date: serhiy.storchaka on 2026-10-12 15:29:18
Changes

  1. cmimetype changed to: "text/x-fossil-wiki"
  2. comment changed to:
    <code>TclObjTest_Init()</code> leaks its array of object variables (160 bytes) when
    Tcltest is initialized twice in an interpreter, as it is in every
    <code>testthread</code> thread (by the post-init <code>load {} Tcltest</code> and again
    by <code>NewTestThread()</code>). Found with valgrind. The per-interp array was
    introduced by the fix for [3386721fff].
    
    Proposed fix in branch [/timeline?r=tcltest-objtest-reinit-leak|tcltest-objtest-reinit-leak]:
    keep the existing array.
    
  3. foundin changed to: "9.1.0"
  4. login: "serhiy.storchaka"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. severity changed to: "Minor"
  8. status changed to: "Open"
  9. submitter changed to: "serhiy.storchaka"
  10. subsystem changed to: "69. Other"
  11. title changed to:
    TclObjTest_Init leaks when Tcltest is initialized twice in an interpreter
    
  12. type changed to: "Bug"