« Return to Thread: [Tcl-bugs] [ tcl-Bugs-3024359 ] Crash in Tcl_FSGetFileSystemForPath

[Tcl-bugs] [ tcl-Bugs-3024359 ] Crash in Tcl_FSGetFileSystemForPath

by SourceForge.net :: Rate this Message:

| View in Thread

Bugs item #3024359, was opened at 2010-07-02 06:02
Message generated for change (Comment added) made by dgp
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=110894&aid=3024359&group_id=10894

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: 37. File System
Group: obsolete: 8.5.8
Status: Open
Resolution: None
Priority: 8
Private: No
Submitted By: Neil Hampton (neilhampton)
Assigned to: Don Porter (dgp)
Summary: Crash in Tcl_FSGetFileSystemForPath

Initial Comment:
We have a multi-threaded tclkit application that runs several scripts on different threads and it crashes in Tcl_FSGetFileSystemForPath on the line "fsRecPtr = fsRecPtr->nextPtr".

>From investigation, it appears that 'theFilesystemEpoch' is being updated within the loop and the threads file system list is being re-cached leaving fsRecPtr pointing at freed memory.  It is very difficult to track, but it appears that Tcl_FSMountsChanged is being called from within Tcl_FSGetFileSystemForPath.  The path being accessed is the 'wrapped' init.tcl.

----------------------------------------------------------------------

>Comment By: Don Porter (dgp)
Date: 2012-06-11 15:26

Message:

First draft fix committed to branch bug-3024359.  Needs tests and testing.

----------------------------------------------------------------------

Comment By: Don Porter (dgp)
Date: 2012-06-11 09:41

Message:
The issue appears to be care needed by callers of
FsGetFirstFilesystem().  Any caller that keeps and
makes use of the value it returns needs to take care
not to continue using that value whenever another
call to FsGetFirstFilesystem() might be made in the
same thread.  Since TclFSEnsureEpochOk() does
just that, it's clear that Tcl_FsGetFileSystemForPath()
has the potential for this kind of trouble.  The need to
make both those calls and make sure they both report
results on the same epoch is a bit of a puzzle.

----------------------------------------------------------------------

Comment By: Don Porter (dgp)
Date: 2012-05-29 06:40

Message:
This is reported against 8.5.8.  Has it been reconfirmed
with either 8.5.11 release, or current state of core-8-5-branch?

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=110894&aid=3024359&group_id=10894

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Tcl-Bugs mailing list
Tcl-Bugs@...
https://lists.sourceforge.net/lists/listinfo/tcl-bugs

 « Return to Thread: [Tcl-bugs] [ tcl-Bugs-3024359 ] Crash in Tcl_FSGetFileSystemForPath