Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: ff0040ef97e366b3b55b8cc62aef62d3ebef9d02
Ticket: 2910867fffffffffffffffffffffffffffffffff
[tclPkgUnknown] and Safe Base
User & Date: dgp on 2009-12-08 18:10:58
Changes

  1. assignee changed to: "dgp"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    
    Within [tclPkgUnknown] is:
    
                # safe interps usually don't have "file exists",
                if {([interp issafe] || [file exists $file])} {
                    set code [catch {source $file} msg opt]
                    if {$code == 1 &&
                            [lindex [dict get $opt -errorcode] 0] eq "POSIX" &&
                            [lindex [dict get $opt -errorcode] 1] eq "EACCES"} {
                        # $file was not readable; silently ignore
                        continue
                    }
                    if {$code}  {
                        tclLog "error reading package index file $file: $msg"
                    } else {
                        set procdDirs($dir) 1
                    }
                }
    
    so in safe interps we intentionally do not verify file existence
    before attempting the [source].  This predictably fails in many
    of the searched directories, which leads to many [tclLog]
    calls to report these failures.
    
    In a safe interp, [puts] is often disabled as well, so the
    [tclLog] may be silent.   (this is why the poor logic is
    seldom nonticed).
    
    However, when Safe Base is in use, some safety-enabled
    version of [puts] is likely on, and the noisy error messages
    spew forth.
    
    Whole logic of safe interps needs some review at this
    point.
    
    The place this is most easily seen is in test math-12.1
    in the test suite of the math package in tcllib.
    
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "dgp"
  10. subsystem changed to: "38. Init - Library - Autoload"
  11. title changed to: "[tclPkgUnknown] and Safe Base"
  12. type changed to: "Bug"