Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: aea4f0dafc17c10d443505ab345d538089befe3bfdd6671adfb3248f91da2e58
Ticket: 3400944fffffffffffffffffffffffffffffffff
[exit] creates leaks
User & Date: serhiy.storchaka on 2026-10-12 17:08:05
Changes

  1. icomment:
    Still true in 9.1: <code><nowiki>[exit]</nowiki></code> does not unwind the
    stack, so whatever the unwinding would free is reported by valgrind.
    
    A possible solution is to make <code><nowiki>[exit]</nowiki></code> unwind the
    stack, like <code>interp cancel -unwind</code>, and exit the process when the
    unwinding is complete. <code>catch</code> could not stop it, but
    <code>finally</code> clauses would run, so the script could clean up other
    resources, as with Python's <code>SystemExit</code> exception. This is a
    visible change in semantics and needs a TIP.
    
    The test suite problem was addressed as suggested here: tests which exit a
    thread in mid-operation have the <code>notValgrind</code> constraint, and
    <code><nowiki>[testthread exit]</nowiki></code> is no longer used in tests.
    
  2. login: "serhiy.storchaka"
  3. mimetype: "text/x-fossil-wiki"