Skip to content
Tcl Source Code History Of Ticket 8d1fc70995703e67
Login

History Of Ticket 8d1fc70995703e67

Artifacts Associated With Ticket 8d1fc70995703e67

  1. Ticket change [1b2c4d7346] (rid 250369) by tomkiti on 2026-01-13 19:25:55:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-plain"
    4. comment initialized to:
      If an lseq "count" command returns an error, the command returns an error forever:
      
      % lseq 0 count 5
      0 1 2 3 4
      
      % lseq count 5
      invalid bareword "count"
      in expression "count";
      should be "$count" or "{count}" or "count(...)" or ...
      
      % lseq 0 count 5
      invalid bareword "count"
      in expression "count";
      should be "$count" or "{count}" or "count(...)" or ...
      
    5. foundin initialized to: "9.0.3"
    6. is_private initialized to: "0"
    7. login: "tomkiti"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "1c57e67924247fd7926e89348f266c081ec57db2"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "tomkiti"
    14. subsystem initialized to: "17. Commands I-L"
    15. title initialized to: "lseq "count" error persists across calls"
    16. type initialized to: "Bug"
  2. Ticket change [c2f468dbaf] (rid 250372) by apnadkarni on 2026-01-14 11:57:53:

    1. icomment:
      What platform is this (though I doubt that would make a difference). I could not reproduce this in 9.0.0, 9.0.2, 9.0.3 and trunk (9.1) on Windows.
      
      ```
      % info pat
      9.0.3
      % lseq 0 count 5
      0 1 2 3 4
      % lseq count 5
      invalid bareword "count"
      in expression "count";
      should be "$count" or "{count}" or "count(...)" or ...
      % lseq 0 count 5
      0 1 2 3 4
      ```
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-markdown"
  3. Ticket change [51516e26cb] (rid 250373) by juliannoble2 on 2026-01-14 13:32:26:

    1. icomment:
      curious..
      I see the persistent error as reported.
      
      Tested:
      windows 10 
        9.0b3 9.0.2 and 9.0.3
      windows 11 25H2 
        9.0.2
      
      The 9.0.3 is a recent download of the magicsplat distribution, the 9.0b3 is also magicsplat
      
      The 9.0.2 is bawt
      
      I don't see it in an obsolete 8.7 I have on the windows 10 machine.
      
    2. login: "juliannoble2"
    3. mimetype: "text/plain"
  4. Ticket change [fe324431c3] (rid 250374) by apnadkarni on 2026-01-14 14:52:50:

    1. icomment:
      Ok, found the difference. I have history turned off in my tclshrc. Re-enabling it reproduces the error.
      
      It also means (I suspect) the error would not occur in a script (including the test suite!) since history is disabled in that situation.
      
      In any case, I confirm that it's a real bug that needs investigating.
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-markdown"
  5. Ticket change [da74e8251d] (rid 250377) by griffin on 2026-01-14 16:18:38:

    1. assignee changed to: "griffin"
    2. icomment:
      Thank you for this report!
      
      Even without the unexpected interaction with the user's environment, the use of lseq key words in positions of numeric arguments, should be checked by the command, and provide a more meaningful error message.
      
    3. login: "griffin"
    4. mimetype: "text/x-markdown"
  6. Ticket change [56ec2296eb] (rid 250378) by apnadkarni on 2026-01-14 17:30:50:

    1. icomment:
      And in fact, the error can be reproduced in a script as well. The argument just has to have a reference count > 1.
      
      x.tcl:
      
      ```
      set count count
      puts [catch {lseq 0 $count 5} result],$result
      puts [catch {lseq $count 5} result],$result
      puts [catch {lseq 0 $count 5} result],$result
      ```
      
      Running it,
      
      ```
      c:\src\tcltk\wip\tcl\win>tclsh x.tcl
      0,0 1 2 3 4
      1,invalid bareword "count"
      in expression "count";
      should be "$count" or "{count}" or "count(...)" or ...
      1,invalid bareword "count"
      in expression "count";
      should be "$count" or "{count}" or "count(...)" or ...
      ```
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-markdown"
  7. Ticket change [1ce29f103d] (rid 250379) by apnadkarni on 2026-01-14 17:38:46:

    1. icomment:
      I think the optimization in function `SequenceIdentifyArgument` is broken
      
      ```
      	if (TclHasInternalRep(argPtr, &tclExprCodeType)) {
      	   goto doExpr;
      	}
      ```
      
      Basing a decision on the *current* internal representation type feels like it violates EIAS. Here for example, "count" is an invalid expression but still has bytecode representing it generated (which will raise an error). "count" passed as the third argument though is not to be treated as an integer but a keyword. The above fragment means that treatment of "count" depends on what the last type it was shimmered to which feels like a violation of EIAS.
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-markdown"
  8. Ticket change [a66bae2031] (rid 251970) by jan.nijtmans on 2026-03-09 07:39:30:

    1. closedate changed to: "2461108.8191001043"
    2. closer changed to: "jan.nijtmans"
    3. icomment:
      Since the fix branch is now merged to bothe 9.0 and trunk, this can be closed.
      
      Thanks!
      
    4. login: "jan.nijtmans"
    5. mimetype: "text/x-fossil-wiki"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"