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

History Of Ticket 3479689fffffffff

Artifacts Associated With Ticket 3479689fffffffff

  1. Ticket change [13f200db8c] (rid 124310) by dgp on 2012-01-25 17:43:37:

    1. assignee initialized to: "dgp"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      Tcl_FSConvertToPathType(NULL, Tcl_NewStringObj("a//b",-1));
      
      will crash at least on unix systems in a -enable-symbols=mem build
      of Tcl.
      
      This passes a 0-refcount value to SetFsPathFromAny() which
      passes it on to Tcl_FSJoinToPath().  As documented, on exit
      Tcl_FSJoinToPath() frees the value, but then SetFsPathFromAny()
      continues on, trying to build a "path" intrep in the freed space.  BOOM!
      
    4. foundin initialized to: "obsolete: 8.5.11"
    5. is_private initialized to: "0"
    6. priority initialized to: "8"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "dgp"
    10. subsystem initialized to: "37. File System"
    11. title initialized to: "shimmer 0-refcount to path can segfault"
    12. type initialized to: "Bug"
  2. Ticket change [2b95168b31] (rid 118765) by dgp on 2012-01-26 00:48:27:

    1. icomment:
      In the more usual build, this won't crash, but will result in
      building up the path value in a Tcl_Obj that's been returned to
      the free pool.  Eventually that will get reallocated to some other
      use, and you'll see memory corruption effects as two different owners
      battle over the use of the struct.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  3. Ticket change [886e7fd8ce] (rid 131865) by dgp on 2012-01-26 01:30:06:

    1. icomment:
      
      The quick and easy fix is to bracket the
      call to Tcl_FsJoinToPath() with refcount incr/decr:
      
          pathPtr->refCount++;
          transPtr = Tcl_FSJoinToPath(pathPtr, 0, NULL);
          pathPtr->refCount--;
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [52d7a932ce] (rid 126390) by dgp on 2012-01-26 01:31:23:

    1. icomment:
      
      The more attractive fix is to take Tcl_FSJoinToPath()
      back behind the barn and shoot it in the head.
      
      Why oh why do we document interfaces we can plainly
      see are broken?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  5. Ticket change [d98f5b2ac5] (rid 107632) by dgp on 2012-01-26 23:43:56:

    1. icomment:
      
      Simple fix committed for 8.5.12
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [9b2dff2b16] (rid 111085) by dgp on 2012-01-28 04:58:05:

    1. closedate changed to: "2012-01-27T21:58:05"
    2. closer changed to: "dgp"
    3. icomment:
      
      
      allow_comments - 1
      
      Better fix on trunk with refactoring of the *Join*Path*
      routines into more usable interfaces.
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "dgp"