Artifacts Associated With Ticket 578617ffffffffffffffffffffffffffffffffff
Ticket change [f7304186fe] (rid 91339) by rmax on 2002-07-08 10:54:28:
- assignee initialized to: "vincentdarley"
- cmimetype initialized to: "text/plain"
- 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 - foundin initialized to: "obsolete: 8.4b1"
- priority initialized to: "6"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "rmax"
- subsystem initialized to: "37. File System"
- title initialized to: "Tcl_FSCreateDirectory() aborts"
- type initialized to: "Bug"
Ticket change [84c2377b22] (rid 117615) by vincentdarley on 2002-07-08 17:59:55:
- 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...
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [2e12f0b023] (rid 119163) by rmax on 2002-07-08 18:12:05:
- icomment:
Logged In: YES user_id=124643 Oops, sorry. I had overlooked that part of the manpage.
- login: "rmax"
- mimetype: "text/plain"
- username: "rmax"
- icomment:
Ticket change [bc33d84a39] (rid 129630) by vincentdarley on 2002-07-08 19:11:23:
- closedate changed to: "2002-07-08T12:11:23"
- closer changed to: "vincentdarley"
- icomment:
Logged In: YES user_id=32170 Removed crash, but such a zero-refcount function call will simply return an error. Clarified docs.
- login: "vincentdarley"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "vincentdarley"