Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 9ae5d38e3cb0d6bdde15440e4dca310d8b359e08c5d8e554fe6ae50884d56291
Ticket: 79474c58800cdf94559a2c01230b4536aa416016
refchan segfault
User & Date: sebres on 2024-05-16 18:24:33
Changes

  1. icomment:
    It looks like 1 object (03A09940) containing `rc0` (`$ch`) doesn't get decremented, so still hold a reference to statePtr (and therefore it is not released yet), whereas another object (03A09B08), also containing `rc0`, is removed.
    
    Here is a debug excerpt explaining that (3x preserve / 2x release of `statePtr` 03D933F0):
    ```
      ***==st allocat: 03D933F0 / Tcl_CreateChannel
      ***++st preserv: 03D933F0 / TclGetChannelFromObj === 03A09B08: rc0 ==
      ***++st preserv: 03D933F0 / TclGetChannelFromObj === 03A09940: rc0 ==
      ***++st preserv: 03D933F0 / Tcl_UnregisterChannel
      ***--st release: 03D933F0 / Tcl_UnregisterChannel
      ***--st release: 03D933F0 / FreeChannelInternalRep === 03A09B08
    ```
    
    Maybe it is something like ScriptRecord (script of chan event as list containing `$ch` as apply parameter) or some interim duplication (which then becomes a leak).
    However related the whole profiler output, all `CreateScriptRecord` are paired by `DeleteScriptRecord`.
    
  2. login: "sebres"
  3. mimetype: "text/x-markdown"