Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: fb162997546e6e99ec5fcf072dcb94a119ff7f25
Ticket: 218676ffffffffffffffffffffffffffffffffff
String rep freed before internal rep
User & Date: nobody on 2000-10-26 01:04:01
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 1710 Bug
    Version: 8.0.5
    SubmitDate: '1999-04-05'
    LastModified: '1999-09-20'
    Severity: CRIT
    Status: Released
    Submitter: pat
    ChangedBy: hobbs
    OS: All
    OSVersion: NA
    Machine: NA
    FixedDate: '1999-09-20'
    FixedInVersion: 8.2
    ClosedDate: '2000-10-25'
    
    
    Name:  Paul Duffin
    email:  [email protected]
    Support:  None
    Severity:  1
    Synopsis:  String rep freed before internal rep.
    
    ObservedBehavior:
        When for whatever reason both the internal representation and the string
        representation of an object are freed, e.g. inside Tcl_SetStringObj, or
        Tcl_SetListObj, or when an object itself is freed, the string rep is
        being freed
        before the internal rep. This breaks my code because I try and access
        the string
        representation in the freeIntRepProc.
        
        The core is inconsistent, sometimes it frees the string rep first, other
        times 
        it frees it last, and the behaviour has changed from 8.0.4 to 8.1b2,
        although it
        affects all 8.* releases.
        
    
    DesiredBehavior:
        I expect the string representation to be freed after the internal
        representation
        so that I can use it in my freeIntRepProc. This affects all 8.* releases
        so 
        should be fixed in Tcl8.1b2 and Tcl8.0.5.
    
    
    This is not documented behavior, but it's an easy fix so we might as well make it.  I can't see any reason why the internal rep should not be freed before the string rep in all cases, so we may want to document this as the expected sequence, and possibly add a new interface to encapsulate this.  
    04/27/1999 10:00 - stanton -
    This fix has been applied sometime before 8.2.0 (internal free rep
    proc is called before InvalidateStringRep). 
    -- 09/20/1999 hobbs
    
    
    
  4. foundin changed to: "final: 8.0.5"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "String rep freed before internal rep"
  11. type changed to: "RFE"