Artifacts Associated With Ticket 43c94f9598
Ticket change [9e3f5a9bba] (rid 234969) by stu on 2024-11-12 04:44:21:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-plain"
- comment initialized to:
This on my system. Your auto_paths may vary. $ echo 'puts $::auto_path' | tclsh8.6 /usr/local/lib/tcl/tcl8.6 /usr/local/lib/tcl $ echo 'puts $::auto_path' | tclsh9.0 /usr/local/lib/tcl/tcl9.0 /usr/local/lib/tcl $ echo '' > init.tcl $ echo 'puts $::auto_path' | tclsh8.6 /usr/local/lib/tcl/tcl8.6 /usr/local/lib/tcl $ echo 'puts $::auto_path' | tclsh9.0 can't read "::auto_path": no such variable Wish provides a different error message for the same problem: $ wish9.0 application-specific initialization failed: invalid command name "tcl_findLibrary" And for fun: $ echo 'puts "I like fish!"' > init.tcl $ echo 'puts $::auto_path' | tclsh9.0 I like fish! can't read "::auto_path": no such variable
- foundin initialized to: "9.0"
- is_private initialized to: "0"
- login: "stu"
- priority initialized to: "5 Medium"
- private_contact initialized to: "702b65e835b7b4b4720d6e9d37fc582f82909394"
- resolution initialized to: "None"
- severity initialized to: "Important"
- status initialized to: "Open"
- submitter initialized to: "stu"
- subsystem initialized to: "38. Init - Library - Autoload"
- title initialized to:
Tcl will not start properly if there is an init.tcl file in the current dir
- type initialized to: "Bug"
Ticket change [1d84a3cae7] (rid 235039) by anonymous on 2024-11-13 14:46:25:
- icomment:
Stuart, thank you for the example. I fear, it works as expected. The default init.tcl is in library\init.tcl You may look into generic\tclInterp.c, function "Tcl_Init" how an alternate init script may be specified. I also see this as a security hole. Thank you, Harald
- login: "anonymous"
- mimetype: "text/x-fossil-wiki"
- username: "oehhar"
- icomment:
Ticket change [0eca06f59b] (rid 235040) by jan.nijtmans on 2024-11-13 15:21:10:
- icomment:
Trying to reproduce it: <pre> $ echo '' > init.tcl $ echo 'puts $::auto_path' | tclsh8.6 /usr/lib/tcl8.6 /usr/lib $ echo 'puts $::auto_path' | tclsh9.0 //zipfs:/lib/tcl/tcl_library //zipfs:/lib/tcl /usr/lib </pre> That looks fine to me. Did you set any environment variables, like TCL_LIBRARY or TCLPKGPATH? What platform?
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [15c30c12c9] (rid 235045) by jan.nijtmans on 2024-11-13 15:50:44:
- icomment:
My guess: You used a --disable-zipfs build (which you didn't mention in the bug-report). In that case, "::tcl::zipfs::tcl_library_init", which should return the tcl_library directory in the zipfs might return the empty string. If $tcl_library is the empty string, then [file join $tcl_library init.tcl] (tclInterp.c:449) will point to init.tcl in the current directory. If my guess is right, [465d4546e2|this] should solve the problem.
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [80e6ac7d3a] (rid 235047) by stu on 2024-11-13 16:19:04:
- icomment:
You're pretty quick, Jan! Yes it is only with a --disable-zipfs build. I just did some digging and ran some tests after getting the hint from Harald and arrived at the thought that the path might be "". Didn't investigate further as I came here to add the note about --disable-zipfs. The fix you provided looks good but I don't know enough about that area of the code to evaluate if it's the best/right fix. Probably is. :)
- login: "stu"
- mimetype: "text/plain"
- username: "stu"
- icomment:
Ticket change [289cd00796] (rid 235068) by jan.nijtmans on 2024-11-13 21:45:52:
- assignee changed to: "sebres"
- closedate changed to: "2460628.40686233"
- closer changed to: "jan.nijtmans"
- icomment:
Well, Sergey finished the work, updating all branches with a fix. Even 8.5/8.6, because the same could happen there if $pkgPath contains {} as list element. Thanks! - login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [31951f494f] (rid 235079) by jan.nijtmans on 2024-11-14 09:35:44:
- closedate changed to: "2460628.8998165"
- icomment:
Problem in testcase fixed [837f2fa878f7d776|here]. Unfortunately, it caused a broken macOS build on Github actions. This is exactly why I am advocating fixing bugs firt on trunk, and only cherrypick to lower branches after trunk builds are successful.
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
Ticket change [f3392b7348] (rid 235086) by jan.nijtmans on 2024-11-14 11:49:42:
- closedate changed to: "2460628.99284747"
- icomment:
@sebres, if you like to "merge --cherrypick" this fix to the core-8-5-branch, just go ahead. (I'm not interested in this branch any more)
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"