Overview
| Artifact ID: | 2b316f00cbf1d2ea4f9c19483917aacd65f04430 |
|---|---|
| Ticket: | 1835292fffffffffffffffffffffffffffffffff
Safe interp problems with namespaces and ensembles |
| User & Date: | kjnash on 2007-11-20 18:05:36 |
Changes
- assignee changed to: "hobbs"
- cmimetype changed to: "text/plain"
- comment changed to:
(Using 8.5b2 for Linux x86) (1) Existence of namespaces In 8.4, a freshly created safe interpreter has no namespaces apart from "::". However, in 8.5b2, a freshly created safe interpreter has "::tcl" and its children. This might not be inherently unsafe, but it certainly breaks assumptions that were valid in 8.4. (2) The namespace ensemble command chan is not one of the safe commands, but it is not listed in the hidden commands either. % interp create -safe -- bar bar % % interp eval bar {info commands c*} case catch clock concat close continue % % interp eval bar {chan} invalid command name "chan" % % interp hidden bar file socket open pwd glob exec encoding load fconfigure source exit cd % (3) More trouble with chan: exposure of its member commands. All the commands ::tcl::chan::* are exposed, but ::chan is not one of the safe commands. (4) Hiding a namespace ensemble command The commands ::tcl::Info_* are exposed, even if ::info is hidden. At best, it is laborious to hide an ensemble command; at worst, you might not realize that the command is an ensemble with members in a namespace, that also need to be hidden. % interp create -safe -- foo foo % interp eval foo {info commands i*} info if interp incr % interp hide foo info % interp eval foo {info commands i*} invalid command name "info" % % interp eval foo {::tcl::Info_commands i*} if interp incr % - foundin changed to: "obsolete: 8.5b2"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "kjnash"
- subsystem changed to: "20. [interp]"
- title changed to: "Safe interp problems with namespaces and ensembles"
- type changed to: "Bug"