Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 1cb95e9683735cd26012b9c0fcfe65fc4abe5875
Ticket: 484200ffffffffffffffffffffffffffffffffff
TclEvalObjvInternal: potential segfault
User & Date: dgp on 2001-11-21 15:11:23
Changes

  1. assignee changed to: "msofer"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    
    Within TclEvalObjvInternal(), trace
    procedures are called in a loop like:
    
    for (tracePtr = iPtr->tracePtr;
         tracePtr != NULL;
         tracePtr = nextPtr) {
      nextPtr = tracePtr->nextPtr;
      ...
      (*tracePtr->proc)(tracePtr->clientData, interp,
                        iPtr->numLevels, commandCopy,
                        cmdPtr->proc, cmdPtr->clientData,
                        objc, argv);
    }
    
    Trouble with that is (*tracePtr->proc) could
    do anything, including calling Tcl_DeleteTrace
    on the Tcl_Trace held by nextPtr.  If it does
    that, there will be a segfault.
    
    The technique used by command and variable traces
    that involves defining additional structures
    such as ActiveCommandTrace and special handling
    could be adapted to solve this problem.
    
  4. foundin changed to: "obsolete: 8.4a4"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "dgp"
  9. subsystem changed to: "45. Parsing and Eval"
  10. title changed to: "TclEvalObjvInternal: potential segfault"
  11. type changed to: "Bug"