Skip to content
Tcl Source Code History Of Ticket 1379287fffffffff
Login

History Of Ticket 1379287fffffffff

Artifacts Associated With Ticket 1379287fffffffff

  1. Ticket change [6de7b3a5f1] (rid 128785) by georgeps on 2005-12-13 07:04:12:

    1. assignee initialized to: "vincentdarley"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      I found this odd behavior first in an old tclkit.  In
      that case it was an 8.5a4-based version (sometime
      before the BigNum code was integrated) and it caused a
      segfault.
      
      I just tried today with the HEAD and it's broken, but
      doesn't segfault for me.  Steve Redler IV confirmed
      that it's broken in Slackware Linux.  Steve was able to
      get a segfault with a tclkit built with the Tcl HEAD as
      of about 2 weeks ago -- using the patterns I list below.
      
      I haven't yet tried todays HEAD with a tclkit, but it
      could be that tclkit introduces a segfault rather than
      just the strange behavior.
      
      In the tclkit the pattern is:
      # cd /tmp
      # tclkit8.5 
      % cd ..
      % pwd
      % cd ..
      % pwd
      Memory fault (core dumped) 
      
      Note: I had to be root to get the /tclkit8.5.core created.
      
      The backtrace on the core indicates a loop of patterns
      that goes on for quite a while (endless recursion? or
      possibly the debugger is confused).
      #0  0x080811bf in TclDefaultBgErrorHandlerObjCmd ()
      [this is where it repeats for thousands of times]
      #1  0x08094ca7 in Tcl_FSLstat ()
      #2  0x080a593e in Tcl_FSLstat ()
      #3  0x080a58dc in Tcl_FSLstat ()
      #4  0x080a7bfb in Tcl_FSLstat ()
      #5  0x080d220f in TclpUnloadFile ()
      #6  0x080952a9 in Tcl_FSLstat ()
      #7  0x08094248 in Tcl_FSLstat ()
      #8  0x080a7c0e in Tcl_FSLstat ()
      #9  0x080d220f in TclpUnloadFile ()
      #10 0x080952a9 in Tcl_FSLstat ()
      #11 0x08094248 in Tcl_FSLstat ()
      #12 0x080a7c0e in Tcl_FSLstat ()
      #13 0x080d220f in TclpUnloadFile ()
      ...
      
      
      This demonstrates the broken behavior with today's HEAD:
      $ make shell
      LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}; export
      LD_LIBRARY_PATH;  TCL_LIBRARY="
      /gps/src/cvs/HEAD/tcl/library"; export TCL_LIBRARY; 
      ./tclsh 
      % cd /gps
      % cd ..
      % pwd
      % cd ..
      % pwd
      ..
      % cd ..
      % pwd
      ..
      % cd ..
      % pwd
      ..
      % cd ..
      % pwd
      ..
      % cd /
      % pwd
      /
      % cd ..
      % pwd
      % cd ..
      % pwd
      ..
      
    4. foundin initialized to: "obsolete: 8.5a4"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "georgeps"
    9. subsystem initialized to: "36. Pathname Management"
    10. title initialized to:
      cd .. pwd segfault in NetBSD and Linux (in some cases)
      
    11. type initialized to: "Bug"
  2. Ticket change [5b314bcafd] (rid 118273) by dkf on 2005-12-13 17:40:41:

    1. priority changed to: "9 Immediate"
  3. Ticket change [70be5a8691] (rid 100543) by msofer on 2006-02-26 00:46:36:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Still occurs on current HEAD. Any progress?
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  4. Ticket change [81e1cc0f20] (rid 117126) by georgeps on 2006-02-28 06:02:33:

    1. icomment:
      Logged In: YES 
      user_id=585068
      
      from CdObjCmd -> FSChdir -> Tcl_FSGetNormalizedPath we find
      the failure I think.  pathPtr->bytes is ".." at the start.
      
      None of the code in Tcl_FSGetNormalizedPath that updates the
      ->normPathPtr used at the end is executed.  There is only
      one branch that is entered and that is this:
      
       if (fsPathPtr->cwdPtr != NULL) {
        ...
        if (...) { 
         [not executed]
        } else if (...) {
         [not executed]
        }
       }
       
      We then reach:
       return fsPathPtr->normPathPtr
      
      I added this before the return:
      printf ("fsPathPtr->normPathPtr '%s'\n",
      fsPathPtr->normPathPtr);
      
      which output this:
      fsPathPtr->normPathPtr ''
      
      So the normPathPtr should be updated by some code in
      Tcl_FSGetNormalizedPath based on my interpretation of the
      code and output.
      
      
    2. login: "georgeps"
    3. mimetype: "text/plain"
    4. username: "georgeps"
  5. Ticket change [95e8f6bbe1] (rid 106233) by dgp on 2006-03-01 04:01:37:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      This bug is present in
      Tcl 8.5a3 and 8.5a2 releases.
      
      Still testing...
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [ff41ef5181] (rid 108725) by dgp on 2006-03-01 04:14:19:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Ditto 8.5a1.
      
      Working theory is this bug
      arose with the 2003-04-11
      refactorization that produced
      tclPathObj.c.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  7. Ticket change [edf376fa8e] (rid 103999) by dgp on 2006-03-01 11:19:31:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      This test case worked correctly
      until:
      
      2003-12-14  Vince Darley  <[email protected]>
      
              * generic/tclPathObj.c: complete rewrite of generic file
              normalization code to cope with links followed by '..'.
              [Bug 849514], and parts of [859251]
      
      
      That change made things buggy in this way:
      
      % cd /tmp
      % pwd
      /tmp
      % cd ..
      % pwd
      /tmp
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  8. Ticket change [be043a5a73] (rid 102008) by dgp on 2006-03-01 11:46:16:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      The next relevant changes:
      
      2003-12-17  Vince Darley  <[email protected]>
      
              * generic/tclCmdAH.c:
              * unix/tclUnixFile.c:
              * win/tclWinFCmd.c:
              * tests/fCmd.test:
              * tests/fileSystem.test:
              * doc/file.n: final fix to support for relative
      links and
              its implications on normalization and other parts of the
              filesystem code.  Fixes [Bug 859251] and some Windows
              problems with recursive file delete/copy and
      symbolic links.
      
      2003-12-17  Vince Darley  <[email protected]>
      
              * generic/tclPathObj.c:
              * tests/fileSystem.test: fix and tests for [Bug
      860402] in new
              file normalization code.
      
      ...left things buggy in a different way:
      
      % cd /tmp
      % pwd
      /tmp
      % cd ..
      couldn't change working directory to "..": no such file or
      directory
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  9. Ticket change [016bea65f8] (rid 119481) by dgp on 2006-03-01 12:30:46:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Next relevant revision,
      
      2004-01-21  Vince Darley  <[email protected]>
      
      gets us closer to what we see now:
      
      % cd /tmp
      % pwd
      /tmp
      % cd ..
      % pwd
      % cd ..
      % pwd
      <CRASH>
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  10. Ticket change [3cd0d46ca2] (rid 120973) by dgp on 2006-03-01 12:49:13:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Finally, the next relevant revision:
      
      2004-01-22  Vince Darley  <[email protected]>
      
              * tests/fileSystem.test: 3 new tests
              * generic/tclPathObj.c: fix to [Bug 879555] in file
      normalization.
              * doc/filename.n: small clarification to Windows
      behaviour with
              filenames like '.....', 'a.....', '.....a'.
      
      left things in their current buggy state:
      
      % cd /tmp 
      % pwd
      /tmp
      % cd ..
      % pwd
      % cd ..
      % pwd
      ..
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  11. Ticket change [7d0817c64a] (rid 97176) by dgp on 2006-03-02 04:13:37:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Within Tcl_FSGetNormalizedPath()
      at line 1830 of tclPathObj.c:
      
        Tcl_Obj *absolutePath = fsPathPtr->translatedPathPtr;
      
      The variable name "absolutePath" suggests
      the code expects that path to have
      pathtype TCL_PATH_ABSOLUTE.  In this example,
      that is not the case.  The value is "..",
      which has pathtype TCL_PATH_RELATIVE.  If
      the code does in fact depend on absolutePath
      being an absolutePath, then things are broken
      somewhere.  If it does not depend on that, then
      the variable name choice is poor.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  12. Ticket change [4eebc81a50] (rid 125732) by dgp on 2006-03-02 04:15:06:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      hmmm.. ok, several lines later
      around lline 1849-1851, the
      TCL_PATH_RELATIVE case is handled,
      so this is just a bad var name.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  13. Ticket change [c0ecff0fd2] (rid 102503) by dgp on 2006-03-02 04:22:10:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      The problem is with
      TclFSNormalizeAbsolutePath().
      In particular the call around
      line 1884.
      
      The "absolutePath" value passed
      in is "/tmp/.." and the resulting
      normalized form is "".
      
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  14. Ticket change [c66d4a9256] (rid 121766) by dgp on 2006-03-02 04:29:33:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      revised subject.
      
      Note that the lexical processing
      of ".." by TclFSNormalizeAbsolutePath
      is already a point of controversy.
      See Bug 961646.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. subsystem changed to: "37. File System"
    5. title changed to: "TclFSNormalizeAbsolutePath() fails on /tmp/.."
    6. username: "dgp"
  15. Ticket change [edd05537a9] (rid 103962) by dgp on 2006-03-02 23:53:53:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      I think the attached patch
      solves the problem, but review
      and testing is welcome.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  16. Ticket change [b5611a7b5e] (rid 125232) by dgp on 2006-03-02 23:53:54:

    1. icomment:
      
      
      File Added - 169495: 1379287.patch
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  17. Ticket change [052248aa0f] (rid 89004) by dgp on 2006-03-03 11:32:11:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2006-03-03T04:32:11"
    3. closer changed to: "dgp"
    4. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Revised patch now works on
      OSX and any other system 
      where /tmp is a symlink.
      Tests broken if /xxx is a
      symlink, but that ought to
      be rare enough to not worry about.
      
      Committing so that someone
      will test on Windows.
      
      
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. resolution changed to: "Fixed"
    8. status changed to: "Pending"
    9. username: "dgp"
  18. Add attachment "1379287.patch" [451a640a1f] (rid 116828) by dgp on 2006-03-03 11:32:11.

  19. Ticket change [564a657b28] (rid 94293) by dgp on 2006-03-03 11:32:13:

    1. icomment:
      
      
      File Added - 169576: 1379287.patch
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  20. Ticket change [1ae78748d4] (rid 123053) by dgp on 2006-03-03 11:32:14:

    1. icomment:
      
      
      File Deleted - 169495: 
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  21. Ticket change [b3eca75898] (rid 124933) by vincentdarley on 2006-03-04 01:52:50:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      Thanks dgp!  I've just had a kid so will not have much time
      to examine this sort of thing for a while... Vince.
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  22. Ticket change [eed7ea52f5] (rid 108889) by dgp on 2006-03-04 02:16:56:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Test failure on Windows:
      
      ---- Result was:
      Paths should be equal: /bar , C:/bar
      ---- Result should have been (exact matching):
      ok
      ==== filesystem-1.45 FAILED
      
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. status changed to: "Open"
    5. username: "dgp"
  23. Ticket change [31f9b0c94f] (rid 93527) by dgp on 2006-03-04 03:10:11:

    1. closedate changed to: "2006-03-03T20:10:11"
    2. closer changed to: "dgp"
    3. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Here's an additional patch
      I'm committing to HEAD.
      
      Windows testers please?
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. status changed to: "Pending"
    7. username: "dgp"
  24. Add attachment "1379287-amend.patch" [a37225041c] (rid 110048) by dgp on 2006-03-04 03:10:11.

  25. Ticket change [c3c0070629] (rid 111717) by dgp on 2006-03-04 03:10:12:

    1. icomment:
      
      
      File Added - 169653: 1379287-amend.patch
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  26. Ticket change [8bf1798246] (rid 127665) by dgp on 2006-03-04 05:37:07:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      still same failure on Windows.
      
      What a garbage routine this
      is to debug.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  27. Ticket change [b8bc68c531] (rid 129010) by dgp on 2006-03-04 09:34:01:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      another attempt committed.
      Windows testers needed to
      check fileSystem.test
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  28. Ticket change [8710afc639] (rid 131629) by sf-robot on 2006-03-18 10:22:36:

    1. closedate changed to: "2006-03-18T03:22:36"
    2. closer changed to: "sf-robot"
    3. icomment:
      Logged In: YES 
      user_id=1312539
      
      This Tracker item was closed automatically by the system. It was
      previously set to a Pending status, and the original submitter
      did not respond within 14 days (the time period specified by
      the administrator of this Tracker).
      
      
    4. login: "sf-robot"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "sf-robot"
  29. Ticket change [5c2933a155] (rid 115247) by msofer on 2006-03-30 00:11:45:

    1. resolution changed to: "None"
    2. status changed to: "Open"
  30. Ticket change [c5f06f4ad9] (rid 121674) by msofer on 2006-03-30 00:11:46:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Today's HEAD on linux: 'make test' is clean, but
      % cd /; pwd
      /
      % cd ..; pwd
      % cd ..; pwd
      ..
      
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  31. Ticket change [29ab6df6c0] (rid 88907) by dgp on 2006-03-30 05:24:14:

    1. closedate changed to: "2006-03-29T22:24:14"
    2. closer changed to: "dgp"
    3. icomment:
      Logged In: YES 
      user_id=80530
      
      
      fix committed to HEAD
      please test on all platforms.
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Pending"
    8. username: "dgp"
  32. Ticket change [5625fc1187] (rid 94270) by msofer on 2006-03-30 07:20:00:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Tests ok on linux
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  33. Ticket change [319d856333] (rid 93460) by msofer on 2006-03-30 07:28:07:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      tclguy reports on XP: filesystem-1.19,22,23 fail, all with
      extra or missing /
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  34. Ticket change [f153210479] (rid 109348) by hobbs on 2006-03-30 07:33:40:

    1. icomment:
      Logged In: YES 
      user_id=72656
      
      Specific failures:
      
      ==== filesystem-1.19 file normalisation FAILED
      ==== Contents of test case:
      
          file normalize ${drive}:/./../../..
      
      ---- Result was:
      B:
      ---- Result should have been (exact matching):
      B:/
      ==== filesystem-1.19 FAILED
      
      
      ==== filesystem-1.22 file normalisation FAILED
      ==== Contents of test case:
      
          file normalize //name/foo/.
      
      ---- Result was:
      //name/foo/
      ---- Result should have been (exact matching):
      //name/foo
      ==== filesystem-1.22 FAILED
      
      
      ==== filesystem-1.23 file normalisation FAILED
      ==== Contents of test case:
      
          file normalize c:/./foo
      
      ---- Result was:
      C://foo
      ---- Result should have been (exact matching):
      C:/foo
      ==== filesystem-1.23 FAILED
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. username: "hobbs"
  35. Ticket change [1393db3654] (rid 124243) by dgp on 2006-04-06 23:43:03:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      commited revised fix for
      this family of bugs.
      
      Please test on Windows.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  36. Ticket change [137024c574] (rid 124218) by georgeps on 2006-04-07 11:01:20:

    1. icomment:
      Logged In: YES 
      user_id=585068
      
      
      $ make shell
      LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}; export
      LD_LIBRARY_PATH; 
      TCL_LIBRARY="/gps/src/cvs/HEAD/tcl/library"; export
      TCL_LIBRARY;  ./tclsh 
      % file normalize ../..
      /gps/src/cvs
      % file normalize /tmp/../..
      % file normalize /.. 
      /
      % file normalize /../..
      %
      
      So the / result isn't occuring here.
      
      Now notice the cd behavior here after a fresh start:
      $ make shell
      LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}; export
      LD_LIBRARY_PATH; 
      TCL_LIBRARY="/gps/src/cvs/HEAD/tcl/library"; export
      TCL_LIBRARY;  ./tclsh 
      % cd /tmp/../..
      couldn't change working directory to "/tmp/../..": no such
      file or directory
      %
      
      Now here is a similar pattern, but the cd doesn't fail
      (perhaps from the failed normalize):
      
      $ make shell
      LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}; export
      LD_LIBRARY_PATH; 
      TCL_LIBRARY="/gps/src/cvs/HEAD/tcl/library"; export
      TCL_LIBRARY;  ./tclsh 
      % file normalize /tmp/../..
      % file normalize ../..
      /gps/src/cvs
      % cd /tmp/../..
      % pwd
      
      So we try this:
      $ make shell
      LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}; export
      LD_LIBRARY_PATH; 
      TCL_LIBRARY="/gps/src/cvs/HEAD/tcl/library"; export
      TCL_LIBRARY;  ./tclsh 
      % file normalize /tmp/../..
      % cd /tmp/../..
      couldn't change working directory to "/tmp/../..": no such
      file or directory
      % 
      
      So some internal state is being corrupt, and causing other
      failures :/  
      
      FWIW the tclkit built with the same sources has this problem:
      $ ./tclkit85-magichimo.localdomain 
      % cd /tmp/../.. 
      % pwd
      % 
      
      
    2. login: "georgeps"
    3. mimetype: "text/plain"
    4. status changed to: "Open"
    5. username: "georgeps"
  37. Ticket change [7c4ed11230] (rid 97060) by dgp on 2006-04-07 21:06:04:

    1. status changed to: "Pending"
  38. Ticket change [02dd4b2c47] (rid 119720) by dgp on 2006-04-07 21:06:05:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      another revision committed.
      please test.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  39. Ticket change [ca77771278] (rid 95351) by dgp on 2006-04-07 21:06:06:

    1. closedate changed to: "2006-04-07T14:06:06"
    2. closer changed to: "dgp"
  40. Ticket change [59ca8f854e] (rid 118030) by sf-robot on 2006-04-22 09:22:40:

    1. icomment:
      Logged In: YES 
      user_id=1312539
      
      This Tracker item was closed automatically by the system. It was
      previously set to a Pending status, and the original submitter
      did not respond within 14 days (the time period specified by
      the administrator of this Tracker).
      
      
    2. login: "sf-robot"
    3. mimetype: "text/plain"
    4. status changed to: "Closed"
    5. username: "sf-robot"
  41. Ticket change [176bb39b9b] (rid 122490) by sf-robot on 2006-04-22 09:22:42:

    1. closedate changed to: "2006-04-22T02:22:42"
    2. closer changed to: "sf-robot"