Artifacts Associated With Ticket b9b2079e6d
Ticket change [0dbbeb4946] (rid 145361) by anonymous on 2016-03-08 18:27:18:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
This is the most simplified code I have been able to write triggering the segfault. It crashes in 32 and 64 bit versions of tcl (debian sid package) ------ #!/bin/tclsh foreach i {a b} {set t_$i ""} proc triggerError {} { set var_t "" foreach i {a b} { set v t_$i upvar 1 [coalesce [set var_t] [set v]] t_$i } } proc coalesce {args} { set res "" foreach i $args { if {$i != ""} {set res $i;break} } return $res } triggerError puts "END" ------ I think the problem has something to do with the parsing of line 9 (the one with the upvar). If you change it like this: set aux [coalesce [set var_t] [set v]] upvar 1 $aux t_$i The problem fades away. - foundin initialized to: "8.6.5"
- is_private initialized to: "0"
- login: "anonymous"
- priority initialized to: "5 Medium"
- private_contact initialized to: "3ff3943d55f2767d3dd1d11b625e46c3cc9479b2"
- resolution initialized to: "None"
- severity initialized to: "Severe"
- status initialized to: "Open"
- submitter initialized to: "anonymous"
- subsystem initialized to: "45. Parsing and Eval"
- title initialized to:
Segfaults parsing a script. The script works nicely in version 8.5
- type initialized to: "Bug"
Ticket change [3cb85433d5] (rid 145363) by dgp on 2016-03-09 04:00:39:
- assignee changed to: "msofer"
- icomment:
A good demo script is a thing of beauty. All was well until http://core.tcl.tk/tcl/info/582877d8ab09712c With that feature merge, the demo script started hanging. Later we saw http://core.tcl.tk/tcl/info/93a75ad1c45fb061 which introduced the segfault still seen in Tcl 8.6.5.
- login: "dgp"
- mimetype: "text/plain"
- priority changed to: "8"
- severity changed to: "Critical"
Ticket change [9392f59e76] (rid 145368) by dgp on 2016-03-09 16:32:00:
- icomment:
#0 0x000000000053d860 in AdvanceJumps (envPtr=0x7fffffffc6d0) at /home/dgp/fossil/tcl8.6/generic/tclOptimize.c:398 #1 0x000000000053d9c9 in TclOptimizeBytecode (envPtr=0x7fffffffc6d0) at /home/dgp/fossil/tcl8.6/generic/tclOptimize.c:433 #2 0x00000000004bcf40 in TclSetByteCodeFromAny (interp=0x8205c0, objPtr=0x869680, hookProc=0x0, clientData=0x0) at /home/dgp/fossil/tcl8.6/generic/tclCompile.c:848 #3 0x000000000054eb72 in TclProcCompileProc (interp=0x8205c0, procPtr=0x87eee0, bodyPtr=0x869680, nsPtr=0x814790, description=0x5d3ac3 "body of proc", procName=0x8803a0 "triggerError") at /home/dgp/fossil/tcl8.6/generic/tclProc.c:2071 - login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [f94467e5e3] (rid 145369) by dgp on 2016-03-09 20:29:39:
- icomment:
A cause of the trouble is that TclEmitInvoke() is creating INST_JUMP4 for break and continue exception handling that overlap each other. This means they mangle each others jump offsets and hilarity ensues. Still working on the primary cause.
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [d296500336] (rid 145443) by dgp on 2016-03-10 20:04:06:
- icomment:
See proposed fix on branch bug-b9b2079e6d.
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [670c2cbd5c] (rid 145695) by dgp on 2016-03-17 12:16:38:
- assignee changed to: "dgp"
- closedate changed to: "2457465.01156122"
- closer changed to: "dgp"
- icomment: "Fixed for 8.6.6+"
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"