Skip to content
Tcl Source Code History Of Ticket e155cedf33
Login

History Of Ticket e155cedf33

Artifacts Associated With Ticket e155cedf33

  1. Ticket change [9dd3c28ecb] (rid 224457) by jan.nijtmans on 2024-04-10 13:16:58:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      Function TclGetOpenMode() doesn't do much error-handling. For example:
      <pre>
      $ tclsh8.6
      % open README.md {RDWR RDONLY}
      file3
      </pre>
      This should be invalid, as `RDWR` and `RDONLY` are incompatible. Also, it doesn't handle repeating:
      <pre>
      $ tclsh8.6
      % open README.md {RDWR RDWR}
      file3
      </pre>
      
      This was noted while working on [https://core.tcl-lang.org/tips/doc/trunk/tip/691.md|TIP #691], but since it would make the TIP
      implementation unneccesary big it's better to separate it.
      
    5. foundin initialized to: "8.6"
    6. is_private initialized to: "0"
    7. login: "jan.nijtmans"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "0c50e5320704d174412e57b873d8932de15303e0"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "jan.nijtmans"
    14. subsystem initialized to: "37. File System"
    15. title initialized to: "Error-handling in TclGetOpenMode()"
    16. type initialized to: "Bug"
  2. Ticket change [0789bde8b7] (rid 224466) by oehhar on 2024-04-10 14:31:24:

    1. icomment:
      Great, Jan, great action.
      
      I saw your commit:
      [https://core.tcl-lang.org/tcl/info/1de2bb21a5da29a2] -> great action
      
      The unmodified line 1182 of file generic/tclIOCmd.c states:
      
      <verbatim>
      default:
      		Tcl_Panic("Tcl_OpenCmd: invalid mode value");
      		break;
      	    }
      </verbatim>
      
      I suppose, this is from old times and should be transfered to an assertion or a real error return.
      Shall I care?
      
      Take care,
      Harald
      
    2. login: "oehhar"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "oehhar"
  3. Ticket change [a98438c917] (rid 224468) by jan.nijtmans on 2024-04-10 14:42:23:

    1. icomment:
      > I suppose, this is from old times ...
      
      In this case, "mode" is produced by the function TclGetOpenModeEx(), and it can only be O_RDONLY, O_WRONLY or O_RDWR. It's impossible to produce another value through user input. Therefore, I think we can keep this Tcl_Panic(): it's impossible to trigger this at script level (neither at C-API level).
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  4. Ticket change [55f8e4be58] (rid 224505) by oehhar on 2024-04-10 16:28:36:

    1. icomment: "Thanks for the explanation - great !"
    2. login: "oehhar"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "oehhar"
  5. Ticket change [e723138cbb] (rid 224548) by jan.nijtmans on 2024-04-11 08:39:32:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2460411.86079251"
    3. closer changed to: "jan.nijtmans"
    4. icomment:
      Fixed [68ff52f3c7|here], present now in core-8-branch and trunk.
      
      It's not really necessary to backport this to 8.6
      
    5. login: "jan.nijtmans"
    6. mimetype: "text/x-fossil-wiki"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"