Overview
| Artifact ID: | 65500073f7302fe82835f35338bd8f4ca0deea8d6adf687bc21ffb926d2f7af5 |
|---|---|
| Ticket: | 45b9faf103f2fd0f7c4a69606b358bb68dbd2596
[try] interaction with local variable names produces segmentation fault |
| User & Date: | pooryorick on 2019-04-08 09:38:22 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-fossil-wiki"
- comment changed 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>. - foundin changed to: "core-8-branch"
- is_private changed to: "0"
- login: "pooryorick"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "pooryorick"
- subsystem changed to: "18. Commands M-Z"
- title changed to:
[try] interaction with local variable names produces segmentation fault
- type changed to: "Bug"