Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 48d1e884925a2e645e50e39d291f575e8f4e184d
Ticket: 941108ffffffffffffffffffffffffffffffffff
TclpObjNormalizePath(unix) breaks VFS spec
User & Date: dgp on 2004-04-24 02:10:40
Changes

  1. assignee changed to: "vincentdarley"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    
    The Tcl_FSNormalizePathProc of a 
    Tcl_Filesystem gets three arguments,
    
      (TclInterp *interp,
       Tcl_Obj *pathPtr,
       int nextCheckPoint)
    
    and an int return value.
    
    It's spelled out in in the Tcl_Filesystem
    docs that both nextCheckPoint and
    the returned value should be indices
    into the pathPtr->bytes array and the
    value should point to either the start
    (0) the end (bytes[cp] == '\0') or
    to a separator character, usually '/'.
    
    The unix TclpObjNormalizePath()
    routine does not follow these rules;
    it returns a value that points "one past"
    the separator, not to it.
    
    The correction is simple, just remove
    lines 1805-1807 from unix/tclUnixFCmd.c
    Those lines incorrectly advance the
    checkpoint value one past where it
    ought to be.
    
    Removing those lines leads to no
    new failures in the test suite on three
    different unix systems I tried.
    
    
  4. foundin changed to: "obsolete: 8.5a2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "dgp"
  9. subsystem changed to: "37. File System"
  10. title changed to: "TclpObjNormalizePath(unix) breaks VFS spec"
  11. type changed to: "Bug"