Skip to content
Tcl Source Code History Of Ticket 586e71dce4
Login

History Of Ticket 586e71dce4

Artifacts Associated With Ticket 586e71dce4

  1. Ticket change [63c67b6eae] (rid 159410) by sebres on 2017-12-08 13:57:04:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. 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.
      
    5. foundin initialized to: ">= 8.6"
    6. is_private initialized to: "0"
    7. login: "sebres"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "sebres"
    13. subsystem initialized to: "47. Bytecode Compiler"
    14. title initialized to:
      command returned bad code: 0 if returns from "dict filter"
      
    15. type initialized to: "Bug"
  2. Ticket change [f1b3afe5d7] (rid 159708) by dgp on 2017-12-19 17:22:27:

    1. assignee changed to: "dkf"
    2. 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
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. severity changed to: "Important"
  3. Ticket change [98f2aeb3f6] (rid 159709) by dgp on 2017-12-19 17:51:48:

    1. 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
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  4. Ticket change [5c2219a16d] (rid 159710) by dgp on 2017-12-19 17:57:24:

    1. icomment:
      
      This error has been lurking since the NRE implementation first merged to trunk.
      
      https://core.tcl.tk/tcl/info/a646e4c362a57466
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  5. Ticket change [7aab517344] (rid 159711) by dgp on 2017-12-19 19:37:46:

    1. icomment:
      
      Appears to be very difficult to find a robust testing path through here.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  6. Ticket change [f8eed511cf] (rid 159712) by dgp on 2017-12-19 20:47:58:

    1. 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.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  7. Ticket change [5d6418e796] (rid 159720) by dgp on 2017-12-19 20:53:53:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2458107.37075571"
    3. closer changed to: "dgp"
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"