Skip to content
Tcl Source Code History Of Ticket 578617ffffffffff
Login

History Of Ticket 578617ffffffffff

Artifacts Associated With Ticket 578617ffffffffff

  1. Ticket change [f7304186fe] (rid 91339) by rmax on 2002-07-08 10:54:28:

    1. assignee initialized to: "vincentdarley"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Tcl_FSCreateDirectory() aborts with:
      
       UpdateStringProc should not be invoked for type path
       Aborted (core dumped)
      
      when the argument object has a refcount of 0, e.g.
      
       Tcl_FSCreateDirectory(Tcl_NewStringObj("foo", -1));
      
      The backtrace looks like this:
      
      #0  0x400f7ab1 in kill () from /lib/libc.so.6
      #1  0x400f78a8 in raise () from /lib/libc.so.6
      #2  0x400f8edb in abort () from /lib/libc.so.6
      #3  0x40091ade in Tcl_PanicVA () from /usr/lib/libtcl8.4.so
      #4  0x40091b06 in Tcl_Panic () from /usr/lib/libtcl8.4.so
      #5  0x4008fec6 in Tcl_GetStringFromObj () from
      /usr/lib/libtcl8.4.so
      #6  0x40085cbd in Tcl_FSJoinPath () from
      /usr/lib/libtcl8.4.so
      #7  0x4008579d in Tcl_FSGetPathType () from
      /usr/lib/libtcl8.4.so
      #8  0x40085721 in Tcl_FSGetPathType () from
      /usr/lib/libtcl8.4.so
      #9  0x40086dab in Tcl_FSGetNormalizedPath () from
      /usr/lib/libtcl8.4.so
      #10 0x40087290 in Tcl_FSGetFileSystemForPath () from
      /usr/lib/libtcl8.4.so
      #11 0x40086152 in Tcl_FSCreateDirectory () from
      /usr/lib/libtcl8.4.so
      
      
      
    4. foundin initialized to: "obsolete: 8.4b1"
    5. priority initialized to: "6"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "rmax"
    9. subsystem initialized to: "37. File System"
    10. title initialized to: "Tcl_FSCreateDirectory() aborts"
    11. type initialized to: "Bug"
  2. Ticket change [84c2377b22] (rid 117615) by vincentdarley on 2002-07-08 17:59:55:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      This obviously isn't ideal, but calling Tcl_FSAnything in 
      that way is clearly going to leak memory even if the 
      result succeeds.  The docs explicitly say that you 
      should not call these APIs with refCounts of zero:
      
      "The \fBTcl_FS...\fR are objectified and may cache 
      internal
      representations and other path-related strings (e.g. the 
      current
      working directory).  One side-effect of this is that one 
      must be
      careful when passing in temporary objects with a 
      refCount of zero. 
      Under some circumstances, the filesystem code may 
      wish to retain a
      reference to the passed in object, and so one must not 
      assume that
      after any of these calls return, the object still has a 
      refCount of
      zero - it may have been incremented.  The practical 
      lesson to learn
      from this is that \fBTcl_Obj *path = Tcl_NewStringObj
      (...) ;
      Tcl_FS...(path) ; Tcl_DecrRefCount(path)\fR is wrong, 
      and may
      segfault.  The 'path' must have its refCount incremented 
      before
      passing it in, or decrementing it."
      
      I'll try to fix the crash in any case...
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  3. Ticket change [2e12f0b023] (rid 119163) by rmax on 2002-07-08 18:12:05:

    1. icomment:
      Logged In: YES 
      user_id=124643
      
      Oops, sorry. I had overlooked that part of the manpage.
      
      
    2. login: "rmax"
    3. mimetype: "text/plain"
    4. username: "rmax"
  4. Ticket change [bc33d84a39] (rid 129630) by vincentdarley on 2002-07-08 19:11:23:

    1. closedate changed to: "2002-07-08T12:11:23"
    2. closer changed to: "vincentdarley"
    3. icomment:
      Logged In: YES 
      user_id=32170
      
      Removed crash, but such a zero-refcount function call 
      will simply return an error.  Clarified docs.
      
      
      
      
    4. login: "vincentdarley"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "vincentdarley"