Skip to content
Tcl Source Code History Of Ticket 64f21f0e506d6365a1db0e53eafdee47e6a18375
Login

History Of Ticket 64f21f0e506d6365a1db0e53eafdee47e6a18375

Artifacts Associated With Ticket 64f21f0e506d6365a1db0e53eafdee47e6a18375

  1. Ticket change [398e83877c] (rid 203300) by anonymous on 2022-08-25 15:59:26:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-plain"
    4. comment initialized to:
      Ubuntu Linux:
      
      Start tclsh on command line.
      
      Paste in the following code:
      
      
      try {
      	no
      } on error outcome {
      	try {
      		yes
      	} on error outcome2 {
      		puts "$outcome $outcome2"
      	}
      }
      
      Expected to get two concatenated error messages, get a streaming column of "y"s until the interpreter finally cores out.
      
      Only the value "yes" in the nested try causes the bug.  I haven't found any other value that triggers it.
      
    5. foundin initialized to: "8.6.5"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "d119f61bcd79212a333062099f7b7aa46182e449"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "anonymous"
    14. subsystem initialized to: "18. Commands M-Z"
    15. title initialized to: "Infinite loop with nested try"
    16. type initialized to: "Bug"
  2. Ticket change [6b3c2eff29] (rid 203301) by sebres on 2022-08-25 16:53:31:

    1. closedate changed to: "2459817.2038317"
    2. closer changed to: "sebres"
    3. comment changed to:
      Ubuntu Linux:
      
      Start tclsh on command line.
      
      Paste in the following code:
      ```
          try {
      	no
          } on error outcome {
      	try {
      		yes
      	} on error outcome2 {
      		puts "$outcome $outcome2"
      	}
          }
      ```
      Expected to get two concatenated error messages, get a streaming column of "y"s until the interpreter finally cores out.
      
      Only the value "yes" in the nested try causes the bug.  I haven't found any other value that triggers it.
      
    4. icomment:
      Try to type `yes` in linux shell (not in tclsh), you'll notice the same picture.<br/>
      Hereafter use `man yes` and see:
      ```
          yes - output a string repeatedly until killed
      ```
      
      Tclsh running in interactive mode has a fallback doing `exec command ...`, if the command is not found in interpreter (this is documented behavior, see the documentation for [unknown](https://www.tcl-lang.org/man/tcl/TclCmd/unknown.htm) handler).<br/>
      To avoid this in tclsh, either start your snippet as script non-interactively (or disable interactive mode or rewrite default unknown in init.tcl) or simply specify your own `yes` command like:
      ```
          proc yes args {return -code error "yes is not a command"}
      ```
      before you'd try your code.
      
      Thus closed as incorrect.
      
    5. login: "sebres"
    6. mimetype: "text/x-markdown"
    7. resolution changed to: "Invalid"
    8. severity changed to: "Cosmetic"
    9. status changed to: "Closed"