Artifacts Associated With Ticket 586e71dce4
Ticket change [63c67b6eae] (rid 159410) by sebres on 2017-12-08 13:57:04:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-wiki"
- comment initialized to:
Somewhere by execute of compiled "dict filter" we have a strange behavior by "return", in comparison to another cycles (where it causes no errors)... Additionally it affects compiled variant only (thus at least within eval/time it looks alright)... <code><pre>% foreach {k v} {a b} {return $k,$v} a,b % dict filter {a b} script {k v} {return $k,$v} command returned bad code: 0 % eval {dict filter {a b} script {k v} {return $k,$v}} a,b % time {dict filter {a b} script {k v} {return $k,$v}} a,b </pre></code> 8.5 is definitely not affected here, but 8.6 and above. - foundin initialized to: ">= 8.6"
- is_private initialized to: "0"
- login: "sebres"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "sebres"
- subsystem initialized to: "47. Bytecode Compiler"
- title initialized to:
command returned bad code: 0 if returns from "dict filter"
- type initialized to: "Bug"
Ticket change [f1b3afe5d7] (rid 159708) by dgp on 2017-12-19 17:22:27:
- assignee changed to: "dkf"
- icomment:
This problem arrived with the introduction of the INST_INVOKE_REPLACE instruction, and appears to indicate a flaw in it. https://core.tcl.tk/tcl/info/0a095f089c8ce09a % dict filter {a b} script {k v} {return $k,$v} command returned bad code: 0 % tcl::unsupported::disassemble script {dict filter {a b} script {k v} {return $k,$v}} ByteCode 0x0x22e7ad0, refCt 1, epoch 15, interp 0x0x228ee80 (epoch 15) Source "dict filter {a b} script {k v} {return $k,$v}" Cmds 1, src 45, inst 21, litObjs 7, aux 0, stkDepth 7, code/src 0.00 Commands 1: 1: pc 0-19, src 0-44 Command 1: "dict filter {a b} script {k v} {return $k,$v}" (0) push1 0 # "dict" (2) push1 1 # "filter" (4) push1 2 # "a b" (6) push1 3 # "script" (8) push1 4 # "k v" (10) push1 5 # "return $k,$v" (12) push1 6 # "::tcl::dict::filter" (14) invokeReplace 6 2 (20) done % tcl::dict::filter {a b} script {k v} {return $k,$v} a,b - login: "dgp"
- mimetype: "text/plain"
- severity changed to: "Important"
Ticket change [98f2aeb3f6] (rid 159709) by dgp on 2017-12-19 17:51:48:
- icomment:
Digging deeper this is simply a flaw in TEOV_Exception() which has function that doesn't match the other callers of TclUpdateReturnInfo() and ProcessUnexpectedResult() in tclBasic.c
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [5c2219a16d] (rid 159710) by dgp on 2017-12-19 17:57:24:
- icomment:
This error has been lurking since the NRE implementation first merged to trunk. https://core.tcl.tk/tcl/info/a646e4c362a57466
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [7aab517344] (rid 159711) by dgp on 2017-12-19 19:37:46:
- icomment:
Appears to be very difficult to find a robust testing path through here.
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [f8eed511cf] (rid 159712) by dgp on 2017-12-19 20:47:58:
- icomment:
Created test basic-50.1 for this. Don't fully like it, because I think it is relying on a "known bug" in the handling of return codes through interpreter aliases as marked off in several interp.test tests. Still, it's a test. The demo script isn't easy to convert to a test because it only fails when entered interactively. I suppose there are ways to simulate that, and some are even found other places in the test suite. Maybe another time. Fixed for 8.6.8 and later.
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [5d6418e796] (rid 159720) by dgp on 2017-12-19 20:53:53:
- assignee changed to: "dgp"
- closedate changed to: "2458107.37075571"
- closer changed to: "dgp"
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"