Artifacts Associated With Ticket 219184
Ticket change [4ce100e3ef] (rid 126964) by nobody on 2000-10-26 05:03:05:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 2248 Bug Version: 8.0.5 SubmitDate: '1999-06-16' LastModified: '2000-05-19' Severity: LOW Status: Assigned Submitter: techsupp ChangedBy: hobbs RelatedBugIDs: 1149 OS: Linux-Red Hat OSVersion: Red Hat 5.1 Machine: Other FixedDate: '2000-10-25' ClosedDate: '2000-10-25' Extensions: None CustomShell: None ReproducibleScript: $ tclsh % catch [error foo] 1 % set catch catch; $catch [error foo] foo ObservedBehavior: 'catch [error foo]' should not have caught the error, since that error was raised before catch would have been invoked. Disabling the bytecode compiler by calculating the command name at run time gives correct behaviour: the error propagates to the top level. DesiredBehavior: The bytecode-compiled version of the code should behave in the same way as the non-bytecode-compiled version. Same behavior exists still in 8.2.0. -- 08/21/1999 hobbs if (cmdTokenPtr->type != TCL_TOKEN_SIMPLE_WORD) { return TCL_OUT_LINE_COMPILE; } in TclCompileCatchCmd would fix this, but ruin other opts. -- 12/03/1999 hobbs Make sure to put the catch in a proc to see the effect when compiled. -- 05/19/2000 hobbs - foundin initialized to: "final: 8.0.5"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "10. Objects"
- title initialized to:
Tcl bytecode interpreter catches errors at inappropriate tim
- type initialized to: "Bug"
Ticket change [65895672ef] (rid 102564) by dkf on 2000-11-08 18:58:34:
- foundin changed to: "obsolete: 8.3.2"
- icomment:
Problem still exists. :^(
- login: "dkf"
- mimetype: "text/plain"
- priority changed to: "7 High"
- username: "dkf"
Ticket change [99993eaeeb] (rid 110821) by dkf on 2001-01-09 22:01:34:
- icomment:
Alternate way of demonstrating the error: proc overeagerCatch {} {catch [return 0]; return 1} puts [overeagerCatch] This prints 0 in Tcl7.6, and 1 in Tcl8.0 and Tcl8.3 (which are what it happens to be convenient for me to test right now...) - login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [645601e0f1] (rid 92746) by msofer on 2001-05-05 05:08:27:
- assignee changed to: "msofer"
- foundin changed to: "None"
- icomment:
Logged In: YES user_id=148712 Still occurs in tcl8.4a3 (partially): (a) the originally reported behaviour still exists % info patchlevel 8.4a3 % set c catch; $c [error foo] foo % catch [error foo] 1 (b) dkf's test-script now behaves as in Tcl7.6: % proc overeagerCatch {} {catch [return 0]; return 1} % puts [overeagerCatch] 0 - login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
Ticket change [3db8c0b2dd] (rid 121137) by msofer on 2001-08-15 00:07:15:
- icomment:
Logged In: YES user_id=148712 dkf's test proc overeagerCatch behaves correctly only as a side effect of the fact that [return] is now bytecompiled; the behaviour is still incorrect as demonstrated by proc overeagerCatch {} {catch [error GOOD]; error BAD} - login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [4258fe946e] (rid 116353) by msofer on 2001-08-15 20:10:15:
- icomment:
Logged In: YES user_id=148712 The problem can also be fixed with if (*(cmdTokenPtr->start) != '{') { return TCL_OUT_LINE_COMPILE; } in TclCompileCatchCmd. This would insure that only braced bodies get compiled; does it ruin any other optimisation? - login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Add attachment "patch219184.txt" [d9e43b8c29] (rid 107688) by msofer on 2001-08-15 22:39:10.
Ticket change [fc6c3fc0a7] (rid 108237) by msofer on 2001-08-15 22:39:10:
- assignee changed to: "hobbs"
- icomment:
File Added - 9570: patch219184.txt Logged In: YES user_id=148712 Enclosing a patch for review. Two tests fail, but due to bugs in the test suite: - ioUtil.test: 3.7 (see bug #451200) - interp.test: 29.1 and 29.2 (outline compiling adds one execution level; it can be corrected by putting the command in braces *or* correcting the expected result. But the test seems badly specified if it depends on this ...) Note: the same approach (if valuable) can be used to fix bug #219166 and relatives ...
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
Ticket change [fdf7522042] (rid 108508) by msofer on 2001-08-21 23:36:10:
- icomment:
Logged In: YES user_id=148712 New and improved patch; [catch] is bytecompiled correctly also when the script is not a simple word.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Add attachment "patch219184.txt" [c5ac183734] (rid 112041) by msofer on 2001-08-21 23:36:10.
Ticket change [3de4f6ed77] (rid 121174) by msofer on 2001-08-21 23:36:11:
- icomment:
File Added - 9792: patch219184.txt
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [c8da6c98f6] (rid 122175) by msofer on 2001-08-22 20:57:07:
- assignee changed to: "msofer"
Ticket change [b9fc94955a] (rid 129240) by msofer on 2001-08-22 21:00:52:
- closedate changed to: "2001-08-22T14:00:52"
- closer changed to: "msofer"
- icomment:
Logged In: YES user_id=148712 New complete patch (with test); commited
- login: "msofer"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "msofer"
Ticket change [fd43828a81] (rid 108384) by msofer on 2001-08-22 21:00:53:
- icomment:
File Added - 9842: patch219184.txt
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Add attachment "patch219184.txt" [8b7a49bda9] (rid 127573) by msofer on 2001-08-22 21:00:53.