Skip to content
Tcl Source Code History Of Ticket 3603434fffffffffffffffffffffffffffffffff
Login

History Of Ticket 3603434fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 3603434fffffffffffffffffffffffffffffffff

  1. Ticket change [ffe6b06dd3] (rid 108842) by dgp on 2013-02-05 16:38:31:

    1. assignee initialized to: "dgp"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      The portions of filesystem pathname handling in
      the generic/*.c files of Tcl include special per-platform
      handling of [file pathtype] queries.  In particular, on
      Windows, any pathname starting with ?:/ , where ?
      is any single byte, gets labeled as an absolute path
      based on the assumption that it's a drive designation.
      This happens whether or not such a drive is actually
      on the system.
      
      Over in the tclWinFile.c implementation of
      TclpObjNormalizePath(), though, a normalization
      of  a path of the same pattern, say "a:/", is more
      constrained.  If the "a" drive is not actually on
      the system (floppy drives are uncommon now),
      it refuses to declare that "a:/" is a normalized
      pathname.  Instead, it claims "a:" is a normalized
      pathname, and leaves the rest for other filesystems
      to continue normalizing.  This is trouble and inconsistent.
      The cooperative normalization process relies on working
      on an absolute pathname, and this misstep leaves us
      with a volumerelative one.  It's also inconsistent with the
      rules imposed in the generic code.
      
      Most of the time this bug is harmless, because no other
      filesystem is present or makes an effort to claim, and the
      final fallback is to give it native ownership and just assume
      what's left is normalized.  This turns out to be correct.  The
      only time this causes trouble is when the 
      Tcl_FSNormalizePathProc of some other Tcl_Filesystem
      recursively calls for a prefix of the path to be normalized
      as part of its own attempt to normalize more of the path.
      For example, this is what trofs does.  Then the bug leads
      to endless recursion and a crash when the stack is exhausted.
      Thanks to Brian Griffin for taking notice of this.  Demonstration
      isn't difficult.  On Windows, bring trofs into an interp and then
      attempt a [glob a:/] on a system with no A: drive.  CRASH!
      
      The simplest way to restore consistency is to make sure 
      TclpObjNormalizePath claims the first / in the path as part
      of a normalized path, whether or not the drive exists on
      the system.  Then the assumptions of the cooperative
      normalization among Tcl_Filesystems are maintained and
      crashes are avoided.
      
      To be clear, this is not the "most correct" solution.  Getting
      something more correct involves some serious rewriting so
      that platform processing is better contained in platform files.
      This is a minimal consistency and sanity and crash prevention
      fix given the state of things as they are.
      
    4. foundin initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "dgp"
    10. subsystem initialized to: "36. Pathname Management"
    11. title initialized to:
      Win TclpObjNormalizePath fails for non-existent drive
      
    12. type initialized to: "Bug"
  2. Ticket change [e011cc3330] (rid 115130) by dgp on 2013-02-05 23:47:54:

    1. foundin changed to: "obsolete: 8.4.19"
    2. icomment:
      Fix is on branch bug-3603434
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. username: "dgp"
  3. Ticket change [e3a0ca9fd1] (rid 87826) by dgp on 2013-02-05 23:56:44:

    1. icomment:
      Fix merged to all active branches.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [b383546441] (rid 124873) by dgp on 2013-02-05 23:56:45:

    1. closedate changed to: "2013-02-05T16:56:45"
    2. closer changed to: "dgp"
    3. icomment:
      
      
      allow_comments - 1
      
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "dgp"