Skip to content
Tcl Source Code History Of Ticket 45b9faf103f2
Login

History Of Ticket 45b9faf103f2

Artifacts Associated With Ticket 45b9faf103f2

  1. Ticket change [65500073f7] (rid 170859) by pooryorick on 2019-04-08 09:38:22:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      The following script produces a segmentation fault:
      
      <code><verbatim>
      proc main {} {
          eval {
              try {
                  lindex 5
              } on ok res {} 
          }
          puts $res
      }
      main
      </verbatim></code>
      
      The issue is: 
      
          [https://core.tcl.tk/tcl/artifact?udc=1&ln=4814&name=7abc6eff76e59d6d|tclCmdMZ.c:TryPostBody]
          extracts a variable name from a <code>Tcl_Obj</code>, causing a list
          internal representation to be created on that <code>Tcl_Obj</code>, and the
          original value of that <code>Tcl_Obj</code> to become the first item in the
          list, with a <code>refCount</code> of 1.
      
          On the next line, <code>Tcl_ObjSetVar2</code> is called, and
          [https://core.tcl.tk/tcl/artifact?udc=1&ln=738&name=f5bfe8cd3b7e5fd8|TclObjLookupVarEx]
          subsequently obtains that same <code>Tcl_Obj</code> from the cache of local
          variable names and frees that same list internal representation.
      
          At this point, <code>part1Ptr</code> is a reference to that freed
          <code>Tcl_Obj</code>.
      
    5. foundin initialized to: "core-8-branch"
    6. is_private initialized to: "0"
    7. login: "pooryorick"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "pooryorick"
    13. subsystem initialized to: "18. Commands M-Z"
    14. title initialized to:
      [try] interaction with local variable names produces segmentation fault
      
    15. type initialized to: "Bug"
  2. Ticket change [c87e9ab2ef] (rid 170860) by sebres on 2019-04-08 09:59:09:

    1. icomment:
      See also related ticket [578155d5a1].
      
      I'm for solution with TCL_OWN_OBJREF flag, which is a year ago merged in my own branches and it works there without any issue.
      
    2. login: "sebres"
    3. mimetype: "text/x-fossil-wiki"
  3. Ticket change [926dc37f5e] (rid 170865) by pooryorick on 2019-04-08 13:04:05:

    1. assignee changed to: "pooryorick"
    2. icomment: "Fixed in [4100488a3ca38abf]."
    3. login: "pooryorick"
    4. mimetype: "text/x-fossil-wiki"
    5. resolution changed to: "Fixed"
    6. severity changed to: "Important"
    7. status changed to: "Pending"
  4. Ticket change [5b99bc0cb3] (rid 170879) by sebres on 2019-04-08 15:37:16:

    1. closedate changed to: "2458582.15088248"
    2. closer changed to: "sebres"
    3. icomment: "closed in [e62a48e964]"
    4. login: "sebres"
    5. mimetype: "text/x-fossil-wiki"
    6. status changed to: "Closed"