Bug 357887 - Calls to VG_(fclose) does not close the file descriptor
Summary: Calls to VG_(fclose) does not close the file descriptor
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR major
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-12 13:48 UTC by Nicolas Vienne
Modified: 2016-01-12 14:32 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Vienne 2016-01-12 13:48:38 UTC
I'm using Valgrind 3.11.0 built from sources on Ubuntu x86.
While redirecting lackey's logs to files, I noticed that file descriptors remained opened even after calling the method void VG_(fclose)( VgFile *fp ).
In that function, the "VG_(close)(fp->fd);" seems to be missing after flushing the buffer.
Comment 1 Florian Krohm 2016-01-12 14:32:57 UTC
(In reply to Nicolas Vienne from comment #0)
> I'm using Valgrind 3.11.0 built from sources on Ubuntu x86.
> While redirecting lackey's logs to files, I noticed that file descriptors
> remained opened even after calling the method void VG_(fclose)( VgFile *fp ).
> In that function, the "VG_(close)(fp->fd);" seems to be missing after
> flushing the buffer.

Oh yes, you're absolutely right. Thanks for reporting!
I've fixed this in r15755.