Skip to content
Tcl Source Code History Of Ticket 979879ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 979879ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 979879ffffffffffffffffffffffffffffffffff

  1. Ticket change [29a863dcf4] (rid 88904) by ajpasadyn on 2004-06-25 17:36:03:

    1. assignee initialized to: "vincentdarley"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      After a call to "file isdirectory" certain paths no longer 
      seem to exist.  I observed this with Tcl 8.4.x on Win32, 
      but not with Tcl 8.3.x.  Something must be happening to 
      the variable that is passed to file isdirectory.  If I make 
      sure that it's just a temporary string (as in TestFind2) 
      the problem does not occur.
      
      Example:
      
      proc TestFind1 {d f} {
          set r1 [file exists [file join $d $f]]
          puts "TF1: [file join $d $f] found: $r1"
          puts "TF1: is dir a dir? [file isdirectory $d]"
          set r2 [file exists [file join $d $f]]
          puts "TF1: [file join $d $f] found: $r2"
          puts ""
      }
      proc TestFind2 {d f} {
          set r1 [file exists [file join $d $f]]
          puts "TF2: [file join $d $f] found: $r1"
          puts "TF2: is dir a dir? [file isdirectory [file join $d]]"
          set r2 [file exists [file join $d $f]]
          puts "TF2: [file join $d $f] found: $r2"
          puts ""
      }
      
      file mkdir [file join a b c]
      TestFind1 a [file join b . c]
      TestFind2 a [file join b . c]
      
      
      
      
      My output:
      TF1: a/b/./c found: 1
      TF1: is dir a dir? 1
      TF1: a/b/./c found: 0
      
      TF2: a/b/./c found: 1
      TF2: is dir a dir? 1
      TF2: a/b/./c found: 1
      
      
    4. foundin initialized to: "obsolete: 8.4.6"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "ajpasadyn"
    9. subsystem initialized to: "37. File System"
    10. title initialized to: "file isdirectory causing variable corruption?"
    11. type initialized to: "Bug"
  2. Ticket change [244f62451b] (rid 131087) by mistachkin on 2004-06-28 15:38:54:

    1. icomment:
      Logged In: YES 
      user_id=113501
      
      Results from NON-THREADED build of core-8-4-branch on 
      FreeBSD 4.10-STABLE:
      
      TF1: a/b/./c found: 1
      TF1: is dir a dir? 1
      TF1: a/b/./c found: 1
      
      TF2: a/b/./c found: 1
      TF2: is dir a dir? 1
      TF2: a/b/./c found: 1
      
      Results from THREADED build of core-8-4-branch on FreeBSD 
      4.10-STABLE:
      
      TF1: a/b/./c found: 1
      TF1: is dir a dir? 1
      TF1: a/b/./c found: 1
      
      TF2: a/b/./c found: 1
      TF2: is dir a dir? 1
      TF2: a/b/./c found: 1
      
      Results from NON-THREADED build of HEAD on FreeBSD 4.10-
      STABLE:
      
      TF1: a/b/./c found: 1
      TF1: is dir a dir? 1
      TF1: a/b/./c found: 1
      
      TF2: a/b/./c found: 1
      TF2: is dir a dir? 1
      TF2: a/b/./c found: 1
      
      Results from THREADED build of HEAD on FreeBSD 4.10-
      STABLE:
      
      TF1: a/b/./c found: 1
      TF1: is dir a dir? 1
      TF1: a/b/./c found: 1
      
      TF2: a/b/./c found: 1
      TF2: is dir a dir? 1
      TF2: a/b/./c found: 1
      
      
      
    2. login: "mistachkin"
    3. mimetype: "text/plain"
    4. username: "mistachkin"
  3. Ticket change [225174dd52] (rid 130727) by vincentdarley on 2004-06-28 16:16:26:

    1. status changed to: "Pending"
  4. Ticket change [44f673ba1a] (rid 116796) by vincentdarley on 2004-06-28 16:16:27:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      It looks from mistachkin's comments that this, if it was a
      bug, has been fixed in both 8.4 and 8.5 branches.
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. resolution changed to: "Out of Date"
    5. username: "vincentdarley"
  5. Ticket change [9cc80c0868] (rid 96204) by vincentdarley on 2004-06-28 16:16:28:

    1. closedate changed to: "2004-06-28T09:16:28"
    2. closer changed to: "vincentdarley"
  6. Ticket change [6dd355003d] (rid 128771) by mistachkin on 2004-06-28 16:27:52:

    1. closedate changed to: "2004-06-28T09:27:52"
    2. closer changed to: "mistachkin"
    3. icomment:
      Logged In: YES 
      user_id=113501
      
      
      Is there any way we can find out what was causing this and 
      how it was fixed (in case the root problem has just been 
      obscured and not really fixed)?
      
      Submitter: Was this in a released build and if so, what build?
      
      
      
      
      
    4. login: "mistachkin"
    5. mimetype: "text/plain"
    6. username: "mistachkin"
  7. Ticket change [ee138b690b] (rid 104021) by ajpasadyn on 2004-06-28 21:42:09:

    1. icomment:
      Logged In: YES 
      user_id=1055638
      
      My earlier tests were from the 8.4.5 and 8.4.6 releases on 
      Windows 2000, using threaded builds from both msys-mingw 
      and MSVC.  I just tried the same test using the 8.5a1 release 
      (threaded builds on both compilers), and I got the following 
      output (even worse than before):
      
      TF1: a/b/./c found: 1
      TF1: is dir a dir? 1
      TF1: a/b/./c found: 0
      
      TF2: a/b/./c found: 1
      TF2: is dir a dir? 1
      TF2: a/b/./c found: 0
      
      This is really strange.  The way I found this was that I had a 
      set of scripts that was assembling paths from multiple 
      sources, and when I upgraded from 8.3 to 8.4 it stopped 
      working.  This is the smallest test that still showed the 
      problem.  
      
      I cannot access the CVS repository from here, but this 
      evening I can pull it, and I can test using Linux as well.  
      Maybe this only happens on Win32.  
      
      
      
    2. login: "ajpasadyn"
    3. mimetype: "text/plain"
    4. status changed to: "Open"
    5. username: "ajpasadyn"
  8. Ticket change [290755ae39] (rid 88805) by dkf on 2004-06-28 22:19:21:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      Sounds offhand like something is getting cached in the
      internal rep of $d that is semantics-altering.  This is
      really really bad.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. priority changed to: "9 Immediate"
    5. username: "dkf"
  9. Ticket change [434a25de72] (rid 116532) by dkf on 2004-06-28 22:22:37:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      BTW, the fact that it doesn't happen under Joe Mistachkin's
      config might just mean that the problem is Win specific.
      
      (It works for me with 8.4.1, but that doesn't necessarily
      mean very much except for the fact that I ought to upgrade
      sometime!)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  10. Ticket change [ab61dfecd3] (rid 101096) by vincentdarley on 2004-06-28 22:24:43:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      I'll look into this.  I can reproduce it, so shouldn't be
      too hard to solve.  Only subtlety is that it fails in
      different ways on 8.4 vs 8.5 (8.4 = 110 111, 8.5 = 110 110)
      
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  11. Ticket change [a1847a233a] (rid 109728) by ajpasadyn on 2004-06-28 23:11:16:

    1. icomment:
      Logged In: YES 
      user_id=1055638
      
      Just FYI: looks like 8.4.1 acts normally (111 111) and 8.4.2 is 
      when the problem started showing up (110 111)
      
      
      
    2. login: "ajpasadyn"
    3. mimetype: "text/plain"
    4. username: "ajpasadyn"
  12. Ticket change [baa7885cc7] (rid 129356) by hobbs on 2004-06-29 03:14:24:

    1. icomment:
      Logged In: YES 
      user_id=72656
      
      Confirmed that this is a bug in 8-4-head and HEAD of
      2004-06-28 on Windows, but not on Linux (and that HEAD fails
      with 110 110 as Vince noted).
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. resolution changed to: "None"
    5. username: "hobbs"
  13. Ticket change [102d01bf55] (rid 94924) by dkf on 2004-06-29 14:47:37:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      I suspect that the work done on path normalization fixes in
      the HEAD allows the fault results to propagate further, but
      that the problem is not that at all.
      
      Currently, #1 suspicion points at bad information getting
      attached to the Tcl_Obj inside $d, and that this bad info is
      coming from a mistake in the Win native FS.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  14. Ticket change [af56e39f88] (rid 97795) by vincentdarley on 2004-06-29 18:31:27:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      In Tcl 8.5 the problem is caused here in tclPathObj.c (line
      1590):
      
      Tcl_AppendObjToObj(copy, fsPathPtr->normPathPtr);
      /* 
       * Normalize the combined string, but only starting after
       * the end of the previously normalized 'dir'.  This should
       * be much faster!  We use 'cwdLen-1' so that we are
       * already pointing at the dir-separator that we know about.
       * The normalization code will actually start off directly
       * after that separator.
       */
      TclFSNormalizeToUniquePath(interp, copy, cwdLen-1, 
        (fsPathPtr->nativePathPtr == NULL ? &clientData : NULL));
      
      where we are calling TclFSNormalizeToUniquePath contrary to
      its documentation, with a string which may still contain
      './' or '../' sequences (from fsPathPtr->normPathPtr).
      
      It's not really clear where the fix should be -- perhaps the
      special 'joined' pathObj representation shouldn't be allowed
      if the second part has '.' or '..' sequences, or else this
      bit of code shown above should be cleverer, or else the
      native normalization code should actually cope with the
      existence of such sequences.
      
      The problem occurs because the TclpObjNormalizePath routine
      tries to find the 'long, unique path name' for each path
      segment (one by one), and therefore turns 'a/b/./c' into
      'a/b/b/c' (since the real name of '.' is 'b' in this case).
       Similar bugs exist with '..'.  
      
      Lastly I should add that turning on 'TclNORM_LONG_PATH' in
      tclWinFile.c seems to fix the problem, at least for the
      cases I've tested (it activates a different version of the
      normalization), but I think that other cases might still
      trigger a failure.
      
      Anyway, this is too hard for a quick fix, so it'll take me
      some time (i.e. until I have some time) -- others are very
      welcome to look into it.
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  15. Ticket change [32097f2325] (rid 93540) by vincentdarley on 2004-06-30 01:17:02:

    1. icomment:
      
      
      File Added - 92323: winFile.patch
      
      Logged In: YES 
      user_id=32170
      
      Here's a proposed patch for Tcl 8.5.  Something similar (if
      not identical) should work for 8.4
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  16. Add attachment "winFile.patch" [cf8eb85e13] (rid 113003) by vincentdarley on 2004-06-30 01:17:02.

  17. Ticket change [2a7c9f4bc2] (rid 118585) by ajpasadyn on 2004-06-30 03:02:57:

    1. icomment:
      Logged In: YES 
      user_id=1055638
      
      That patch seems to work for me with both the 8.4 and 8.5 
      versions.  I didn't try anything other than that test yet 
      though, so hopefully it doesn't break anything else.
      
      
    2. login: "ajpasadyn"
    3. mimetype: "text/plain"
    4. username: "ajpasadyn"
  18. Ticket change [64b08dca87] (rid 92811) by vincentdarley on 2004-06-30 21:45:33:

    1. priority changed to: "5 Medium"
    2. resolution changed to: "Fixed"
  19. Ticket change [14ae8678cd] (rid 124436) by vincentdarley on 2004-06-30 21:45:34:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      Checked in fix for Tcl 8.5.
      
      Leaving open since fix still needs applying to 8.4
      
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  20. Ticket change [2cc023520a] (rid 118960) by vincentdarley on 2004-07-02 23:52:36:

    1. status changed to: "Closed"
  21. Ticket change [4d3be97f9b] (rid 127023) by vincentdarley on 2004-07-02 23:52:37:

    1. closedate changed to: "2004-07-02T16:52:37"
    2. closer changed to: "vincentdarley"
    3. icomment:
      Logged In: YES 
      user_id=32170
      
      Backported to 8.4 branch.
      
      
      
    4. login: "vincentdarley"
    5. mimetype: "text/plain"
    6. username: "vincentdarley"