Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c99d5d19cf91540be1699f7ecdef3fa227532e1a
Ticket: 589863ffffffffffffffffffffffffffffffffff
corruption in execution traces?
User & Date: hemanglavana on 2002-08-28 00:40:05
Changes

  1. icomment:
    Logged In: YES 
    user_id=81875
    
    The upload button doesn't show up on my browser, so I
    am attaching the patch here. Please verify whether it resolves
    the memory problem or not.
    
    Index: tclBasic.c
    ===================================================================
    RCS file: /cvsroot/tcl/tcl/generic/tclBasic.c,v
    retrieving revision 1.68
    diff -r1.68 tclBasic.c
    5026c5026
    <     ckfree( (char*) tracePtr );
    ---
    >     Tcl_EventuallyFree( (char*) tracePtr, TCL_DYNAMIC);
    Index: tclCmdMZ.c
    ===================================================================
    RCS file: /cvsroot/tcl/tcl/generic/tclCmdMZ.c,v
    retrieving revision 1.75
    diff -r1.75 tclCmdMZ.c
    4137a4138,4145
    >             /*
    >              * The proc invoked might delete the traced
    command which 
    >              * which might try to free tracePtr.  We want
    to use tracePtr
    >              * until the end of this if section, so we use
    >              * Tcl_Preserve() and Tcl_Release() to be sure
    it is not
    >              * freed while we still need it.
    >              */
    >           Tcl_Preserve((ClientData) tracePtr);
    4159a4168
    >           Tcl_Release((ClientData) tracePtr);
    
    
    
  2. login: "hemanglavana"
  3. mimetype: "text/plain"
  4. username: "hemanglavana"