From: SourceForge.net <no...@so...> - 2004-08-27 13:51:01
|
Bugs item #1017004, was opened at 2004-08-26 12:27 Message generated for change (Settings changed) made by dgp You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1017004&group_id=10894 Category: 20. [interp] Group: current: 8.4.7 Status: Open Resolution: None Priority: 5 Submitted By: Don Porter (dgp) Assigned to: Jeffrey Hobbs (hobbs) >Summary: [namespace import] / alias foil each others loop prevention Initial Comment: TclPreventAliasLoop doesn't detect and prevent loops that include a [namespace import] link. % namespace eval ns namespace export alias % interp alias {} ns::alias {} ns::target ns::alias % namespace import ns::alias % interp alias {} ns::target {} alias ns::target % alias too many nested evaluations (infinite loop?) ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2004-08-26 20:33 Message: Logged In: YES user_id=80530 BTW, I think it's fair to claim that neither of these issues is really a bug. Tcl certainly allows other ways to set up infinite loops: proc foo {} foo; foo and the recursion limit is the only protection. I raise these points only because loops made purely of aliases, or purely of imports, are detected and prevented at creation time. The pure import loops must be prevented to avoid loss of the base Tcl_Command, but any loop that includes an alias could reasonably be allowed to be caught at runtime. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2004-08-26 20:13 Message: Logged In: YES user_id=80530 Another variation, this time the flaw is in the loop detection inside Tcl_Import(): % namespace eval ns namespace export alias % interp alias {} ns::alias {} alias ns::alias % namespace import ns::alias % alias too many nested evaluations (infinite loop?) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1017004&group_id=10894 |