Artifacts Associated With Ticket 1224553fffffffff
Ticket change [b17506689d] (rid 98148) by dgp on 2005-06-21 01:41:32:
- assignee initialized to: "dgp"
- cmimetype initialized to: "text/plain"
- comment initialized 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 - foundin initialized to: "obsolete: 8.5a4"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "46. Traces"
- title initialized to: "Active*Trace inadequate?"
- type initialized to: "Bug"
Ticket change [040d9e6f17] (rid 119926) by dgp on 2005-06-21 08:49:05:
- closedate changed to: "2005-06-21T01:49:05"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 now I see; the ActiveVarTrace records get linked into a list attached to the interp... ...and all trace deletions walk that list to keep thing consistent.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Closed"
- username: "dgp"