Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8ed4eba88e4561c26e78fe977ab4e7661af3f002
Ticket: 1189274fffffffffffffffffffffffffffffffff
Crash in TclExecuteByteCode
User & Date: msofer on 2005-04-25 17:08:06
Changes

  1. icomment:
    Logged In: YES 
    user_id=148712
    
    As noted in the comment in line 4755 "We already checked
    above that each list temp holds a valid list object".
    Specifically, the call to Tcl_ListObjLength at line 4700
    shimmers the obj to listType (or leaves it unchanged if its
    string rep is {}).
    
    Hence, whenever the obj has an empty string rep,
    TclListObjGetElements sets the variable listLen to garbage.
    This is indeed a bad bug, which will show its face whenever
    the junky listLen is less than valIndex.
    
    TclListObjGetElements should *not* be have been used here
    anyway (ie, even if no list is empty): it is possible that
    one of the lists gets shimmered out of listType as a side
    effect of setting a previous var, there is no guarantee that
    the check at line 4700 remains valid when we get to line
    4727 in the case i>0.
    
    
  2. login: "msofer"
  3. mimetype: "text/plain"
  4. username: "msofer"