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

History Of Ticket 2884203fffffffff

Artifacts Associated With Ticket 2884203fffffffff

  1. Ticket change [0a31b39472] (rid 113773) by patthoyts on 2009-10-22 21:09:40:

    1. assignee initialized to: "dgp"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      We are getting a crash in filesystem-9.5, 9.6 and 9.7 on Windows XP and Windows 7 with core-8-5-branch.
      I bisected the commits and this fault was introduced by the commit on 2009-08-20 by dgp:
       "* generic/tclPathObj.c: [Bug 2806250] Prevent the storage of strings ..."
      The relevant part of the call stack looks like this:
      MSVCRTD!memcpy
      tcl85tg!Tcl_DuplicateObj
      tcl85tg!AppendPath
      tcl85tg!Tcl_FSGetNormalizedPath
      tcl85tg!TclpMatchInDirectory
      tcl85tg!Tcl_FSMatchInDirectory
      tcl85tg!DoGlob
      tcl85tg!DoGlob
      tcl85tg!TclGlob
      The crash occurs because in Tcl_DuplicateObj the objPtr->length is -1
      I've checked on Windows XP and Windows 7 each time using MSVC6 to compile.
      
    4. foundin initialized to: "obsolete: 8.5.7"
    5. is_private initialized to: "0"
    6. priority initialized to: "9 Immediate"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "patthoyts"
    10. subsystem initialized to: "37. File System"
    11. title initialized to: "Crash in filesystem-9.5 test on Windows"
    12. type initialized to: "Bug"
  2. Ticket change [d33e766206] (rid 123260) by dgp on 2009-10-23 04:36:50:

    1. icomment:
      
      Is it known which AppendPath() call in
      Tcl_FSGNP() causes the crash?
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  3. Ticket change [0f0bcbce87] (rid 94723) by dgp on 2009-10-23 04:55:08:

    1. icomment:
      
      Does this show up on HEAD as well, or
      only on core-8-5-branch?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [48857b8db5] (rid 99900) by patthoyts on 2009-10-23 05:10:29:

    1. icomment:
      Its the second call:
      copy = AppendPath(dir, fsPathPtr->normPathPtr);
      At this point 'dir' look like:
      ?dir
      0x02a877b0
          refCount: 0x00000000
          bytes: 0x02a66030 "ÝÝ....ÝÝ"
          length: 0xffffffff
          typePtr: 0x00000000 {name=??? freeIntRepProc=??? dupIntRepProc=??? ...}
          internalRep: {longValue=0x02a87780 doubleValue=-6.2774360118698813e+066 otherValuePtr=0x02a87780 ...}
      
      but fsPathPtr seems to be messed up:
      ?fsPathPtr
      0x02a7aea8
          translatedPathPtr: 0x00000000 {refCount=??? bytes=??? length=??? ...}
          normPathPtr: 0x02a877e0 {refCount=0x00000001 bytes=0x02a984c0 "" length=0x00000004 ...}
          cwdPtr: 0x02a87888 {refCount=0x00000002 bytes=0x02a98530 "`û§Pÿ§" length=0x00000003 ...}
          flags: 0x00000001
          nativePathPtr: 0x00000000
          filesystemEpoch: 0x00000001
          fsRecPtr: 0x00653ac0 {clientData=0x00000000 fsPtr=0x10169c08 fileRefCount=0x0000002f ...}
      
      HEAD is ok and filesystem.test passes all tests - so just 8.5 branch.
      
      
    2. login: "patthoyts"
    3. mimetype: "text/plain"
    4. username: "patthoyts"
  5. Ticket change [4e3712662b] (rid 127187) by dgp on 2009-10-24 03:15:42:

    1. icomment:
      
      Since HEAD is ok, see whether applying the
      patch below to 8-5-branch makes it ok as well.
      
      I still prefer to get a full understand to confirm the
      best fix, but if this works it can be a second-best
      solution to get 8.5.8 out.
      
      Index: tclPathObj.c
      ===================================================================
      RCS file: /cvsroot/tcl/tcl/generic/tclPathObj.c,v
      retrieving revision 1.66.2.9
      diff -u -r1.66.2.9 tclPathObj.c
      --- tclPathObj.c        20 Aug 2009 14:59:53 -0000      1.66.2.9
      +++ tclPathObj.c        23 Oct 2009 20:13:31 -0000
      @@ -1457,6 +1457,9 @@
      
              if (PATHFLAGS(pathPtr) != 0
                      && fsPathPtr->cwdPtr == cwdPtr) {
      +#if 1
      +           return fsPathPtr->normPathPtr
      +#else
                  pathPtr = fsPathPtr->normPathPtr;
      
                  /* TODO: Determine how much, if any, of this forcing
      @@ -1521,6 +1524,7 @@
                  pathPtr->typePtr = &tclFsPathType;
      
                  return pathPtr;
      +#endif
              }
           }
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [4cdae3482f] (rid 126960) by patthoyts on 2009-10-24 05:39:11:

    1. icomment:
      Applying this patch prevents the crash and the tests now pass.
      
      
    2. login: "patthoyts"
    3. mimetype: "text/plain"
    4. username: "patthoyts"
  7. Ticket change [2420851fbb] (rid 131063) by dgp on 2009-10-27 05:14:20:

    1. icomment:
      
      Any chance you are testing a build with
      the TclNORM_LONG_PATH directive enabled?
      
      The code in lines 2916-2938 of Revision 1.95.2.2
      of tclWinFile.c do not appear able to handle the
      case of lastValidPathEnd == NULL, which appears
      to happen in the test case.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  8. Ticket change [f418195d91] (rid 129839) by dgp on 2009-10-27 05:29:56:

    1. icomment:
      
      In the AppendPath() call that leads to a crash,
      both arguments are (Tcl_Obj *).  Can you report
      the values of the respective typePtr fields?  I am
      expecting each of them to be values of the "string"
      Tcl_ObjType.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  9. Ticket change [593bcfe585] (rid 117939) by dgp on 2009-10-28 03:25:17:

    1. icomment:
      
      Here's the patch that fixes it.
      Missing ref count.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  10. Add attachment "2884203.patch" [62fd115097] (rid 92498) by dgp on 2009-10-28 03:26:19.

  11. Ticket change [f3b406caf2] (rid 129760) by dgp on 2009-10-28 03:26:19:

    1. icomment:
      
      
      File Added - 348439: 2884203.patch
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  12. Ticket change [32469dc9a8] (rid 93586) by dgp on 2009-10-28 03:31:25:

    1. closedate changed to: "2009-10-27T20:31:25"
    2. closer changed to: "dgp"
    3. icomment:
      
      
      allow_comments - 1
      
      
      Patch applied to 8-5-branch and HEAD.
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "dgp"