Skip to content
Tcl Source Code History Of Ticket 1671138
Login

History Of Ticket 1671138

Artifacts Associated With Ticket 1671138

  1. Ticket change [1dbc531a4e] (rid 90862) by dgp on 2007-02-28 18:58:55:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      This script hangs Tcl:
      
      proc demo {} {
          foreach {} x {}
      }
      demo
      
      By contrast, the non-compiled
      [foreach] does this:
      
      % foreach {} x {}
      foreach varlist is empty
      
      I'm not convinced that an error
      is really the right response, but
      infinite loop is definitely wrong.
      
      
    4. foundin initialized to: "obsolete: 8.5a6"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "dgp"
    10. subsystem initialized to: "47. Bytecode Compiler"
    11. title initialized to: "foreach: empty var list -> inf loop"
    12. type initialized to: "Bug"
  2. Ticket change [2ebef5c115] (rid 92940) by dkf on 2007-03-01 16:04:35:

    1. assignee changed to: "dkf"
    2. priority changed to: "9 Immediate"
  3. Ticket change [a64511817b] (rid 98570) by dkf on 2007-03-01 16:23:10:

    1. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      There is a way of detecting the difference without a loop:
        % proc foo {} {foreach {} x {error bar}}; foo
        bar
        % foreach {} x {error bar}
        foreach varlist is empty
      Proposed fix: detect the empty-var-list case and don't compile.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  4. Ticket change [0251130af1] (rid 119624) by dkf on 2007-03-01 17:09:17:

    1. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      Fixed in HEAD. Backport needed.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. resolution changed to: "Fixed"
    5. username: "dkf"
  5. Ticket change [a823c99278] (rid 98925) by dkf on 2007-03-01 17:16:49:

    1. closedate changed to: "2007-03-01T10:16:49"
    2. closer changed to: "dkf"
    3. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      Backported.
      
      
    4. login: "dkf"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "dkf"
  6. Ticket change [3072bef990] (rid 93257) by dgp on 2007-03-01 23:02:20:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      New test fails in 8.4.15:
      
      ==== foreach-9.1 compiled empty var list FAILED
      ==== Contents of test case:
      
          proc foo {} {
              foreach {} x {
                  error "reached body"
              }
          }
          list [catch { foo } msg] $msg
      
      ---- Result was:
      1 {}
      ---- Result should have been (exact matching):
      1 {foreach varlist is empty}
      ==== foreach-9.1 FAILED
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. status changed to: "Open"
    5. username: "dgp"
  7. Ticket change [0b97fc8d9f] (rid 114023) by dkf on 2007-03-01 23:35:14:

    1. closedate changed to: "2007-03-01T16:35:14"
    2. closer changed to: "dkf"
    3. status changed to: "Closed"