JDK 9 RFR of 8168628: (ch) JVM Crash in : ~StubRoutines::jshort_disjoint_arraycopy
Alan.Bateman at oracle.com
Wed Dec 7 16:09:56 UTC 2016
On 07/12/2016 16:00, Brian Burkhalter wrote:
> On Dec 6, 2016, at 8:59 AM, Brian Burkhalter
> <brian.burkhalter at oracle.com <mailto:brian.burkhalter at oracle.com>> wrote:
>> On Dec 6, 2016, at 8:31 AM, Alan Bateman <Alan.Bateman at oracle.com
>> <mailto: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.
> So am I OK to push this patch now as-is, is more work required, or
> should it be deferred to JDK 10?
It's probably okay although we should never be calling allocate0 to
truncate the file. That is, I'd prefer if allocate0 was just a simpler
that called fallocate, keep all decisions in FileChannelImpl.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nio-dev