Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b17506689d3a0318cfa12979f4d66ecb905a0502
Ticket: 1224553fffffffffffffffffffffffffffffffff
Active*Trace inadequate?
User & Date: dgp on 2005-06-21 01:41:32
Changes

  1. assignee changed to: "dgp"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    
    dgp... ActiveVarTrace usage?
    
    [21:17]dgpit's a pattern used in traces to allow for
    trace deletion during trace execution
    [21:18]dgpa simple for loop would fail.
    [21:20]miguelI did not understand that last sentence
    [21:20]dgpfor (t=varPtr->tracePtr; t!=NULL;
    t=t->nextPtr) {
        runtrace(t)
    }
    [21:20]dgpthat's a simple (and wrong) strategy for
    stepping through the traces on a variable.
    [21:21]dgpwrong because runtrace() can destroy t,
    leaving t->nextPtr as an invalid operation.
    [21:22]miguelok
    [21:22]dgpso ActiveVarTrace values are used to bridge
    the gap
    [21:22]dgpoversimplified:
    [21:23]dgpfor (t=varPtr->tracePtr; t!=NULL; t=a) {
        a = t->nextPtr;
        runtrace(t)
    }
    [21:23]dgpbut I'm wondering why that's not also
    wrong, just under different circumstances.
    [21:24]miguelyou mean: if runtrace(t) destroys
    t->nextPtr directly, for instance?
    [21:24]dgpand 1201035 is apparently due to the
    difficulty in applying the same trick when stepping
    backward through the list.
    [21:24]dgpyes.
    [21:26]miguelmmhhh ....
    [21:26]dgpI suppose its much less likely
    [21:28]miguelmaybe struct VarTrace should be richer -
    some refCount, some "deleted" value to its flags could
    help managing these lifetime issues?
    [21:28]miguelalthough "deleted" could be signalled by
    having traceProc==NULL too
    
    
    
  4. foundin changed to: "obsolete: 8.5a4"
  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: "46. Traces"
  10. title changed to: "Active*Trace inadequate?"
  11. type changed to: "Bug"