Skip to content
Tcl Source Code History Of Ticket 8c52e7873850438e
Login

History Of Ticket 8c52e7873850438e

Artifacts Associated With Ticket 8c52e7873850438e

  1. Ticket change [5ccebb9f28] (rid 216654) by dgp on 2023-07-21 16:00:54:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-plain"
    4. comment initialized to:
      The dgp-refactor branch has been exhibiting a panic in TclStackFree
      since the merge of TIP 636 from trunk.  Some merge flaw has introduced
      a defect.
      
      Here is a stripped down demo of the panic:
      
      proc demo {} {
          set l {}
          namespace eval {} {}
          lappend l a b
      }
      demo
      
      TclStackFree: incorrect freePtr (0x2489b50 != 0x2489b3f). Call out of sequence?
      
      
      The [set] and [lappend] commands have the effect of getting "l"
      treated as a compiled local variable.  The panicking TclStackFree
      is one that releases a compiled local previously created with
      TclStackAlloc.  The [namespace eval] seems to be where the corruption
      happens, and the most likely suspect is in the invokeReplace instruction.
      
      Note also that the reported mismatch reports a value of
      MEMSTART(markerPtr) ending in f, which doesn't seem to be
      a result with an acceptable alignment, which is supposed to
      be part of what MEMSTART() does.  Very strange symptoms.
      
    5. is_private initialized to: "0"
    6. login: "dgp"
    7. priority initialized to: "5 Medium"
    8. private_contact initialized to: "8e2300e85be5dd1445b9666eb9429055951e33be"
    9. resolution initialized to: "None"
    10. severity initialized to: "Critical"
    11. status initialized to: "Open"
    12. submitter initialized to: "dgp"
    13. subsystem initialized to: "47. Bytecode Compiler"
    14. title initialized to: "dgp-refactor TclStackFree panic"
    15. type initialized to: "Bug"
  2. Ticket change [4fa66aaac5] (rid 217012) by dgp on 2023-08-03 19:15:25:

    1. icomment:
      
      Don't understand it yet, but the cause is a call to
      
      TclDuplicatePureObj()
      
      in the implementation of the INST_LAPPEND_* instructions.
      
      Replace that with the old standby Tcl_DuplicateObj() and
      the panics are gone.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  3. Ticket change [80e7653ba6] (rid 217013) by dgp on 2023-08-03 19:45:52:

    1. icomment:
      
      TclDuplicatePureObj() includes a call to Tcl_ConvertToType()
      
      When the type is "bytecode", the conversion steps can stomp on
      the execution stack hanging off the interp.
      
      This is a general problem with the bytecode execution engine
      whenever it calls any function that takes an "interp" argument
      that might somehow circle back into the execution stack.  Any
      routine like this needs protecting with enclosure in
      
      DECACHE_STACK_INFO()
      ...
      CACHE_STACK_INFO()
      
      I don't know why the panic only showed up on the dgp-refactor branch,
      but it seems to me the argument for protecting the execution stack
      would apply on trunk as well.
      
      A search through the tickets for CACHE_STACK_INFO should turn up
      more detailed background information from earlier similar problems.
      This is a nasty, hard-to-debug design defect that recurs occasionally.
      A more fundamental design solution would be welcome.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  4. Ticket change [57dc488b2e] (rid 217016) by dgp on 2023-08-03 19:50:30:

    1. closedate changed to: "2460160.32673632"
    2. closer changed to: "dgp"
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. resolution changed to: "Fixed"
    6. status changed to: "Closed"