Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 983839ac0de6c858bb2e0c0553bb5faf50b93074c268c83b518d4ffac490cb80
Ticket: 6525391072cf1e8e8fdc04084a5856adc9bfcc3c
TclObjTest_Init leaks when Tcltest is initialized twice in an interpreter
User & Date: jan.nijtmans on 2026-10-13 12:07:32
Changes

  1. assignee changed to: "jan.nijtmans"
  2. closedate changed to: "2461327.0052428357"
  3. closer changed to: "jan.nijtmans"
  4. 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.
    
  5. icomment:
    Fixed in [214777d5aab51db8|trunk], backported to core-9-0-branch and core-8-6-branch.
    
    Since this is a change in the test only, this ticket will not be mentioned in the release notes.
    
    Many thanks!
    
  6. login: "jan.nijtmans"
  7. mimetype: "text/x-fossil-wiki"
  8. resolution changed to: "Fixed"
  9. status changed to: "Closed"