Artifacts Associated With Ticket 1522803fffffffffffffffffffffffffffffffff
Ticket change [d5d4f81a37] (rid 123699) by kennykb on 2006-07-14 21:35:09:
- assignee initialized to: "dgp"
- cmimetype initialized to: "text/plain"
- comment initialized to:
On an arithmetic error, such as division by zero, the backtrace in ::errorInfo shows the last previous error, rather than the current error. Behold: % catch {unset foo(bar)}; set c 0; expr {1/$c} divide by zero % set errorInfo can't unset "foo(bar)": no such variable while executing "unset foo(bar)" invoked from within "expr {1/$c}" I'm looking at this briefly, but don't expect to solve it quickly, and hope that one of the other developers that understands the bytecode engine might have a keener insight. - foundin initialized to: "obsolete: 8.5a4"
- priority initialized to: "7 High"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "kennykb"
- subsystem initialized to: "45. Parsing and Eval"
- title initialized to: "wrong backtrace on arithmetic error"
- type initialized to: "Bug"
Ticket change [d6d59eb735] (rid 123874) by dgp on 2006-07-18 00:07:37:
- icomment:
Logged In: YES user_id=80530 can someone confirm this problem only shows up in an interactive interp?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [c3f38ea060] (rid 111762) by kennykb on 2006-07-18 00:41:20:
- icomment:
Logged In: YES user_id=99768 I confirm that it fails only in an interactive interpreter.
- login: "kennykb"
- mimetype: "text/plain"
- username: "kennykb"
- icomment:
Ticket change [6bde94256d] (rid 128397) by dgp on 2006-07-18 02:54:27:
- icomment:
Logged In: YES user_id=80530 To demo in a non-interactive shell, use the script: set c 0 if 1 { catch {set foo} expr {1/$c} } The interactive / non-interactive is just a proxy for compiled / direct evaluation, and its bytecompilation one must force to demo the bug. - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [fe43b39925] (rid 108552) by dgp on 2006-07-18 10:08:57:
- icomment:
Logged In: YES user_id=80530 Between revisions 1.153 and 1.154 of tclExecute.c, there were several conversions like: - Tcl_ResetResult(interp); - Tcl_AppendToObj(Tcl_GetObjResult(interp), "divide by zero", -1); + Tcl_SetObjResult(interp, Tcl_NewStringObj("divide by zero", -1)); The loss of the Tcl_ResetResult() call means the loss of a clearing of the ERR_ALREADY_LOGGED flag, leading to the observed bug. This may just be the exposing trigger with the real cause the E_A_L reform that happened earlier. still examining... - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [482d45bd05] (rid 99837) by dgp on 2006-07-18 10:16:36:
- icomment:
Logged In: YES user_id=80530 Making that same conversion on core-8-4-branch leads to the same bug, even though no ERR_ALREADY_LOGGED reform was done on that branch. The real cause is the loss of several Tcl_ResetResult() calls in the bytecode execution engine that had real useful flag clearing effects in addition to initializing an empty result to append to. Simple fix is to put them all back. Better fix might be to find where one call might go to get the function done where it's needed.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [dc9afb5ad3] (rid 114509) by dgp on 2006-07-21 00:17:35:
- assignee changed to: "msofer"
- icomment:
File Added - 185569: 1522803.patch Logged In: YES user_id=80530 Please test/review this patch.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Add attachment "1522803.patch" [83914dffd2] (rid 117406) by dgp on 2006-07-21 00:17:35.
Ticket change [d7e9abfec3] (rid 107350) by msofer on 2006-07-21 17:48:44:
- closedate changed to: "2006-07-21T10:48:44"
- closer changed to: "msofer"
- icomment:
Logged In: YES user_id=148712 Worth recording dgp's explanation in the chat: "the entire patch is general reform. Do the reset operation in the one right place, not here, there, and everywhere." Looks good to me; gets the same 196 failures as unpatched :) Committed.
- login: "msofer"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "msofer"
Ticket change [e16ccec0b2] (rid 87445) by dgp on 2006-07-21 22:00:35:
- icomment:
Logged In: YES user_id=80530 The commit brought in some unrelated changes to tclInt.h and tclObj.c. I took those back out.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment: