Skip to content
Tcl Source Code History Of Ticket 404865ffffffffff
Login

History Of Ticket 404865ffffffffff

Artifacts Associated With Ticket 404865ffffffffff

  1. Ticket change [8fade80a5b] (rid 120315) by msofer on 2001-02-28 13:22:37:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized 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.
      
      
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "msofer"
    9. subsystem initialized to: "17. Commands I-L"
    10. title initialized to: "rare bug in InfoLevelCmd"
    11. type initialized to: "Bug"
  2. Ticket change [d1fb197a6a] (rid 113448) by dkf on 2001-02-28 21:19:51:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      The following exercises the bug:
      
         set s {list }
         for {set i 0} {$i<2000} {incr i} {append s "$i "}
         proc B {} [append s {; puts [string length [info body
      B][info body B]]}
         proc A {} {
            puts A=[info level]=[info level 0]; B; puts A=[info
      level]=[info level 0]
         }
         A
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. priority changed to: "7 High"
    5. username: "dkf"
  3. Ticket change [7df7bcec41] (rid 97323) by dkf on 2001-02-28 21:26:37:

    1. foundin changed to: "obsolete: 8.4a2"
    2. icomment:
      Logged In: YES 
      user_id=79902
      
      The following exercises the bug:
      
         set s {list }
         for {set i 0} {$i<2000} {incr i} {append s "$i "}
         proc B {} [append s {; puts [string length [info body
      B][info body B]]}
         proc A {} {
            puts A=[info level]=[info level 0]; B; puts A=[info
      level]=[info level 0]
         }
         A
      
      
    3. login: "dkf"
    4. mimetype: "text/plain"
    5. username: "dkf"
  4. Ticket change [2e94f34e48] (rid 119245) by dgp on 2001-03-01 00:49:12:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      Looks like the TEXTAREA entry box mangled
      the demonstration script.  Could you upload
      it as an attached file?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  5. Ticket change [5eb98bfd61] (rid 115677) by msofer on 2001-03-01 00:57:49:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      The code does not demonstrate the effect in my setup (linux
      RH 6.2). It is difficult to trigger the event, as dkf
      explained to me: you have to cause the memory at the
      previous location of the evaluation stack to be reused in
      order for the bug to cause a core dump. 
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  6. Ticket change [0b89494ead] (rid 114009) by dkf on 2001-03-01 16:41:30:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      This bug has certainly existed since 8.1.0, and might also
      exist in 8.0.* (the diffs get a little large at that point
      for convenient reading...)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  7. Ticket change [9aaf1ba674] (rid 110993) by dkf on 2001-03-01 17:06:51:

    1. icomment:
      
      
      File Added - 4056: infolevel-bug.tcl
      
      Logged In: YES 
      user_id=79902
      
      Added a script to do this, but I still can't guarantee that
      it will actually successfully trigger the error for anyone
      other that me (it is *very* dependant on the allocation
      mechanism).  However, when I've tested with some version of
      8.0, 8.3 and the current 8.4, I systematically get a crash
      with the code as attached, and no crash if I put a comment
      character in front of the list command.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  8. Add attachment "infolevel-bug.tcl" [8f92f638b6] (rid 120295) by dkf on 2001-03-01 17:06:51.

  9. Ticket change [2a6a4a5a23] (rid 118566) by dkf on 2001-03-02 21:05:15:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      I attach a *very* basic fix.  It is not yet of a quality
      that I'd like to see in the core, but it does indicate the
      sort of thing that needs to be done.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  10. Ticket change [c84cb3dfff] (rid 122078) by dkf on 2001-03-02 21:51:17:

    1. subsystem changed to: "47. Bytecode Compiler"
  11. Ticket change [3df175b117] (rid 121182) by dkf on 2001-03-02 22:35:35:

    1. closedate changed to: "2001-03-02T15:35:35"
    2. closer changed to: "dkf"
    3. resolution changed to: "Fixed"
    4. status changed to: "Closed"