8194734 : Handle to jimage file inherited into child processes (win)
alexandr.miloslavskiy at gmail.com
Sun Apr 8 17:18:34 UTC 2018
> The only surprise is that it doesn't close as it shouldn't need the
> file descriptor after it mmapped.
Indeed, both on Windows and Unix file descriptor can be closed after
On the other hand, ImageFileReader is not prepared for that.
ImageFileReader::get_resource() uses ImageFileReader::read_at() if
resource is not compressed.
Furthermore, ImageFileReader::get_resource() uses
ImageFileReader::read_at() if not entire jimage is mapped. This happens
if architecture is not 64-bit.
Even if these code paths are changed, I still think that closing file
descriptor can be unexpected and will provoke future bugs.
More information about the core-libs-dev