From: SourceForge.net <no...@so...> - 2010-11-02 20:09:59
|
Bugs item #3098302, was opened at 2010-10-29 16:29 Message generated for change (Comment added) made by dkf You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=3098302&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 47. Bytecode Compiler Group: development: 8.6b1.1 Status: Open Resolution: None Priority: 7 Private: No Submitted By: Kevin B KENNY (kennykb) Assigned to: Don Porter (dgp) Summary: Bytecode for [catch] causes crash Initial Comment: If a [catch {some script} result] or [catch {some script} result options] has a write trace fail on the 'result' or 'options' variables, the 'endCatch' bytecode for the catch block gets bypassed, and the exception stack becomes unbalanced. The result is somewhat unpredictable, but likely to be unamusing: Test case: proc failtrace {n1 n2 op} { return -code error "trace on $n1 fails by request" } trace add variable result1 write failtrace proc x {} { variable result1 for {set i 0} {$i < 100} {incr i} { set status2 [catch { set status1 [catch { return -code error -level 0 "original failure" } result1 options1] } result2 options2] lappend retval $status2 $result2 $options2 } } puts [x] Test result: Bad stack top 7 at pc 144 in TclNRExecuteByteCode (min 0, max 6) executing lappend retval $status2 $result2 $options2 TclNRExecuteByteCode execution failure: bad stack top Will follow up on tcl-core. ---------------------------------------------------------------------- >Comment By: Donal K. Fellows (dkf) Date: 2010-11-02 20:09 Message: I *think* the patch is correct. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=3098302&group_id=10894 |