Artifacts Associated With Ticket 420186ffffffffff
Ticket change [3571c1d433] (rid 106934) by nobody on 2001-04-30 16:02:12:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Linux SuSE7.1 example: ==> Test1.tcl >>>>>>>>>>>>>>>>>>>>>>>>>>>> #!/bin/sh #\ exec tclsh "$0" lappend auto_path [ pwd ] puts [ ::Args::Test::Main ] <<<<<<<<<<<<<<<<<<<<<<<<<<<< ==> Test2.tcl >>>>>>>>>>>>>>>>>>>>>>>>>>> namespace eval ::Args { namespace export * } proc ::Args::P1 {} { return P1 } namespace eval ::Args::Test { namespace import ::Args::* } proc ::Args::Test::Main {} { return "P1<[P1]>" } <<<<<<<<<<<<<<<<<<<<<<<<<<< ==> tclIndex >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # Tcl autoload index file, version 2.0 # This file is generated by the "auto_mkindex" command # and sourced to set up indexing information for one or # more commands. Typically each line is a command that # sets an element in the auto_index array, where the # element name is the name of a command and the value is # a script that loads the command. set auto_index(::Args::P1) [list source [file join $dir Test2.tcl]] set auto_index(::Args::Test::Main) [list source [file join $dir Test2.tcl]] <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< If you run: ./Test1.tcl you get: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> too many nested calls to Tcl_Eval (infinite loop?) while executing "namespace current" ("uplevel" body line 1) invoked from within "uplevel namespace current" (procedure "auto_import" line 4) invoked from within "namespace import ::Args::*" (in namespace eval "::Args::Test" script line 2) invoked from within "namespace eval ::Args::Test { namespace import ::Args::* }" (file "/alt/home/dev1usr/Project/Compiler2/test/Config/Test/Test2.tcl" line 7) invoked from within "source /alt/home/dev1usr/Project/Compiler2/test/Config/Test/Test2.tcl" ("uplevel" body line 1) invoked from within "uplevel #0 $auto_index($name)" (procedure "auto_import" line 12) invoked from within "namespace import ::Args::*" (in namespace eval "::Args::Test" script line 2) ... <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - foundin initialized to: "obsolete: 8.3"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "18. Commands M-Z"
- title initialized to: "namespace import"
- type initialized to: "Bug"
Add attachment "test.tcl" [d9db8f2686] (rid 107681) by dgp on 2001-05-01 02:58:57.
Ticket change [ffa78b52f3] (rid 108786) by dgp on 2001-05-01 02:58:57:
- assignee changed to: "dgp"
- foundin changed to: "obsolete: 8.4a3"
- icomment:
File Added - 5866: test.tcl Logged In: YES user_id=80530 Attaching a simplified test script, test.tcl Exercise the bug: $ tclsh % auto_mkindex . test.tcl % lappend auto_path . % Args::Test::Main too many nested calls to Tcl_Eval (infinite loop?) The problem seems to be in [auto_import]. It is using a full [string match $pattern] to filter the names in auto_index, but [namespace import] is only interested in matches according to its stricter matching rules. The wildcards should only match on command names, not parent namespaces.
- login: "dgp"
- mimetype: "text/plain"
- subsystem changed to: "38. Init - Library - Autoload"
- username: "dgp"
Ticket change [0224d65d42] (rid 119594) by dgp on 2001-05-01 04:01:08:
- icomment:
File Added - 5869: import.patch Logged In: YES user_id=80530 Attached patch corrects [auto_import] to do pattern matching in the [namespace import] style. Since there are no other callers of [auto_import], I think this is a safe change in terms of compatibility. I'll commit this to the HEAD tomorrow unless I hear an objection.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [c28ba1564f] (rid 111503) by hobbs on 2001-05-04 03:38:13:
- icomment:
Logged In: YES user_id=72656 looks good to me.
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
- icomment:
Ticket change [f1ceb668bf] (rid 109420) by dgp on 2001-05-04 05:35:08:
- icomment:
File Deleted - 5869: File Added - 5973: import.patch Logged In: YES user_id=80530 Improved patch include updates to test suite, and improved auto_index filtering (fewer script level iterations).
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Add attachment "import.patch" [eb386d1c8e] (rid 103504) by dgp on 2001-05-04 05:36:09.
Ticket change [d175342d03] (rid 113352) by dgp on 2001-05-04 05:36:09:
- icomment:
File Deleted - 5973: File Added - 5974: import.patch
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [5f9055702b] (rid 115838) by dgp on 2001-05-04 05:39:14:
- closedate changed to: "2001-05-03T22:39:14"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 Committed.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dgp"