JDK 9 RFR of 8168628: (ch) JVM Crash in : ~StubRoutines::jshort_disjoint_arraycopy
Brian Burkhalter
brian.burkhalter at oracle.com
Tue Dec 6 16:59:00 UTC 2016
On Dec 6, 2016, at 8:31 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> My comment the check if the file is being extended is at L911 of FileChannelImpl so I would expect that to call allocate0 or truncate0 depending on whether it is extending or shrinking.
I see. For this section I merely left it as it was, i.e., truncate() was called only if it is extending and not otherwise. This ensures that the size is monotonically non-decreasing. If it were to shrink in one thread then it seems that another thread which had previously mapped something beyond the shrunk length could run into the SIGBUS.
Thanks,
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20161206/0ad33abd/attachment-0001.html>
More information about the nio-dev
mailing list