RFR 8194929 : Unreferenced FileDescriptors not closed

Alan Bateman Alan.Bateman at oracle.com
Thu Jan 11 16:14:56 UTC 2018

On 11/01/2018 15:19, Roger Riggs wrote:
> Please review a fix for a missing entry in the mapfiles.  The missing 
> entry point
> caused the closing of unreferenced FileDescriptors to be skipped.
Looks good.

> The tests for FileInputStream, FileOutputStream, and RandomAccess file 
> unreferenced
> FileDescriptors have been updated to verify the raw fds have been closed.
closeCounter is incremented before super.close(). That is good enough 
for the original test as it's just checking that close is called. I'm 
just wondering if the test methods now need to poll 
FileDescriptor::valid or wait until ffd is -1 to ensure to avoid a race 
with the getOpenFileDescriptorCount.


More information about the core-libs-dev mailing list