This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [1.7] old-style symlink handle leak


On Wed, Dec 24, 2008 at 03:58:02PM +0000, Eric Blake wrote:
>Process Explorer shows that cygwin is leaking handles to dangling old-style 
>symlink files during readdir.  Here's a simple testcase:
>
>In cygwin 1.5:
>$ mkdir /cygdrive/c/leak
>$ ln -s nowhere linkfile
>
>In cygwin 1.7:
>$ cd /cygdrive/c/leak
>$ uname -a
>CYGWIN_NT-5.1 EBLAKE 1.7.0(0.190/5/3) 2008-12-23 16:07 i686 Cygwin
>$ echo *
>
>The glob forces bash to do a readdir, where it sees the old-style symlink 
>created by cygwin 1.5.  Thereafter, bash owns a handle to 
>c:\leak\tmp\linkfile.lnk, because something in cygwin1.dll forgot to close it 
>out.

Wow, nice catch.  I'm not in a position to actually test this right now but it
seems like there was an obvious bug in the symlink code which I think I've fixed.

I'm building a snapshot now.  If you are in a position of being able to
test this when it finally shows up I'd appreciate hearing if my changes
fixes the problem.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]