Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 110474b30606a898e31aa5e0c8fbe367f3eff448
Ticket: 3564735fffffffffffffffffffffffffffffffff
Tcl8.5 + incrTcl3.4 [variable] crash
User & Date: dgp on 2012-09-06 02:39:19
Changes

  1. icomment:
    The memory corruption happens in the execution of
    the INST_VARIABLE instruction in tclExecute.c
    
    The "call" TclSetVarNamespaceVar(otherPtr) corrupts
    the memory.  This is really a macro, and the expansion
    includes the line:
    
    ((VarInHash *)(otherPtr))->refCount++;
    
    This is actually writing one byte past allocated memory,
    so this tells me otherPtr points to a struct that is actually
    smaller in size than a VarInHash struct.  I think this must
    be some Itcl declared struct that the Itcl custom resolvers
    allocate.
    
    I hope that's enough information for msofer to understand
    the problem at a more conceptual level and recommend a fix.
    
    
    
  2. login: "dgp"
  3. mimetype: "text/plain"
  4. priority changed to: "9 Immediate"
  5. username: "dgp"