Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 1a656b8b0cf002c8dc7582cdf60e22a9af11eda0
Ticket: 3598580fffffffffffffffffffffffffffffffff
Tcl_ListObjReplace may release deleted elements too early
User & Date: nijtmans on 2012-12-29 17:05:14
Changes

  1. icomment:
    From the Tcl_ListObjIndex documentation:
    > The reference count for the list element is not incremented;
    > the caller must do that if it needs to retain a pointer to the element.
    In this case, the caller doesn't retain a pointer to the element,
    it only passes it to Tcl_ListObjReplace. After that, objP
    is not used any more. The function Tcl_ListObjReplace
    is retaining a pointer to the element (in the list
    representation), so this function should (and does)
    increment the refCount.
    
    
  2. login: "nijtmans"
  3. mimetype: "text/plain"
  4. username: "nijtmans"