Artifacts Associated With Ticket e155cedf33
Ticket change [9dd3c28ecb] (rid 224457) by jan.nijtmans on 2024-04-10 13:16:58:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-wiki"
- 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. - foundin initialized to: "8.6"
- is_private initialized to: "0"
- login: "jan.nijtmans"
- priority initialized to: "5 Medium"
- private_contact initialized to: "0c50e5320704d174412e57b873d8932de15303e0"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "jan.nijtmans"
- subsystem initialized to: "37. File System"
- title initialized to: "Error-handling in TclGetOpenMode()"
- type initialized to: "Bug"
Ticket change [0789bde8b7] (rid 224466) by oehhar on 2024-04-10 14:31:24:
- 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 - login: "oehhar"
- mimetype: "text/x-fossil-wiki"
- username: "oehhar"
- icomment:
Ticket change [a98438c917] (rid 224468) by jan.nijtmans on 2024-04-10 14:42:23:
- 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).
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [55f8e4be58] (rid 224505) by oehhar on 2024-04-10 16:28:36:
- icomment: "Thanks for the explanation - great !"
- login: "oehhar"
- mimetype: "text/x-fossil-wiki"
- username: "oehhar"
Ticket change [e723138cbb] (rid 224548) by jan.nijtmans on 2024-04-11 08:39:32:
- assignee changed to: "jan.nijtmans"
- closedate changed to: "2460411.86079251"
- closer changed to: "jan.nijtmans"
- icomment:
Fixed [68ff52f3c7|here], present now in core-8-branch and trunk. It's not really necessary to backport this to 8.6
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"