Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 2d4cf2f3622994b52236c4d53be6197d9edd4d2f
Ticket: 2055782fffffffffffffffffffffffffffffffff
Crash in [namespace inscope]
User & Date: lars_h on 2008-08-17 23:48:19
Changes

  1. icomment:
    Logged In: YES 
    user_id=938835
    Originator: YES
    
    Pasting in msofer's 2008-08-17 comment in [Bug 1447328], since 
    it is a bit clearer than what he wrote here (crash reported here is not 
    a symptom of what is reported in that bug, but a symptom of a new 
    bug introduced by the fix to the old one).
    
    (Begin quote)
    Oops ...this turned Tcl_ConcatObj from reader to hairy monster, see [Bug
    2055782]. This is against the documented behaviour. This only happens when
    concat'ing one or more empty objs with a single list.
    
    Additionally Tcl_ConcatObj() would corrupt its input when: all things to
    be concat'ed were either empties or canonical lists, and at least 2 were
    not empty, and the first one was unshared. In that case it would add the
    new elements in place, hence modifying its input. THIS IS VERY BAD!
    
    Fixed now in 8-5-branch and HEAD.
    (End quote.)
    
    The remark about empties or canonical lists suggests that a work-around 
    is to use a noncanonical empty list as script argument, e.g.
    
    namespace inscope tcl " " HistInfo
    
    Testing confirms that it avoids the crash. Unfortunately it also leads to 
    shimmering (of all arguments), so it's probably not worth bothering about;
    should anyway use ensembles in 8.5.
    
    
  2. login: "lars_h"
  3. mimetype: "text/plain"
  4. username: "lars_h"