Overview
| Artifact ID: | 8fade80a5b0684f0e2c5668da59cd9f10b6c8e5b |
|---|---|
| Ticket: | 404865ffffffffffffffffffffffffffffffffff
rare bug in InfoLevelCmd |
| User & Date: | msofer on 2001-02-28 13:22:37 |
Changes
- assignee changed to: "dkf"
- cmimetype changed to: "text/plain"
- comment changed to:
(I could *not* trigger this rare event, but I'm sure from the code that the bug is there) InfoLevelCmd uses "iPtr->varFramePtr->objv" - as far as I can tell, it is the only user. Now "iPtr->varFramePtr->objv" is a pointer into the evaluation stack: it is set in TclObjInterpProc (tclProc.c), which gets it from TclExecuteByteCode (tclExecute.c) [see INST_INVOKE] The trouble is that the evaluation stack may grow (and move), so that some combination of events will leave iPtr->varFramePtr->objv pointing to ckfreed memory. The combination of events could be: - proc A invokes proc B; proc B grows the stack - after returning from B, proc a requests "info level" I do not see yet any nice & simple solution. Among the clumsy and/or complicated solutions: - store instead a stack offset into the CallFrame; let InfoLevelCmd know about the execution stack (to my eyes, a very bad thing) - do not free the old stack memory until execution is back at level 0, thereby keeping the pointers valid Remark also that fixing matters in the first manner will work for bytecodes, but may break "info level" for non-compiled scripts! The second one may be very costly in memory.
- foundin changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "msofer"
- subsystem changed to: "17. Commands I-L"
- title changed to: "rare bug in InfoLevelCmd"
- type changed to: "Bug"