Tcl Source Code

View Ticket
Login
Ticket UUID: 3138178
Title: Yet another crash in traces
Type: Bug Version: None
Submitter: ferrieux Created on: 2010-12-15 21:24:10
Subsystem: 46. Traces Assigned To: msofer
Priority: 9 Immediate Severity:
Status: Closed Last Modified: 2011-01-19 15:14:53
Resolution: Fixed Closed By: ferrieux
    Closed on: 2011-01-19 08:14:53
Description:
Reported by Harald Oehlmann on clt thread http://groups.google.com/group/comp.lang.tcl/tree/browse_frm/thread/3408836f98a4bc0a/95b4cc1788636956?rnum=1&_done=%2Fgroup%2Fcomp.lang.tcl%2Fbrowse_frm%2Fthread%2F3408836f98a4bc0a%3F#doc_fe934cdf9091c071

Applying the traceback trick (write trace on ::errorInfo) from http://wiki.tcl.tk/2626 , we get a segfault in 8.5.x for:

 set ::errorLevel -1 
 set ::errorStack {} 
 trace add variable ::errorInfo write { 
        set __n [ info level ] 
        if {![regexp {\n    invoked from within\n} $::errorInfo]} { 
                set ::errorLevel -1; 
                set ::errorStack [list]; 
        } 
        if { ( $__n > 0 ) && ( $__n != $::errorLevel ) } { 
                set ::errorLevel $__n 
                set __l [info level 0] 
                lappend ::errorStack $__l 
        } 
        list } 
 namespace eval ns { 
        set Const(dCommands) [dict create \
                        01 [dict create In {}] \
                        ] 
 } 

 proc ns::nsConfigGet {} { 
        variable Const 
        dict for {Command dParams} $Const(dCommands) { 
                foreach IndexCur {In} { 
                        set CountCur [expr {[dict get $dParams In]/3}] 
                } 
        } 
 } 
 ns::nsConfigGet 

gdb backtrace shows OBJ_AT_TOS garbled when trying to ReturnStk.
Miguel immediately identifies the data caching issue solved 2010-09-22 on the 8.6 branch.
User Comments: ferrieux added on 2011-01-19 15:14:53:
Hey, looks like this benefits from your 2011-01-13 commit re stack computations: the fix still fixes it, and now stack-3.1 no longer fails (and the rest of the test suite is okay too). Congrats !

Backport committed, closing.

msofer added on 2011-01-18 20:36:32:
Alex: is this fixed? Waiting for some action from me? Did not follow ...

ferrieux added on 2010-12-16 04:28:23:
Attaching the backported fix.
Makes stack-3.1 fail (because stack consumption in TEBC has fattened a bit)

ferrieux added on 2010-12-16 04:27:28:

File Added - 396239: decache.patch

Attachments: