8245121: (bf) XBuffer.put(Xbuffer src) can give unexpected result when storage overlaps
Alan Bateman
Alan.Bateman at oracle.com
Sat May 23 08:18:22 UTC 2020
On 19/05/2020 22:06, Brian Burkhalter wrote:
> Here [1] is an updated version of the proposed patch. This version
> adds fences to the X-Buffer version of put($TypeBuffer) and modifies
> the direct and heap implementations to call super.put().
>
> Specification verbiage is also added:
> * If this buffer and * the source buffer share the same backing
> memory, then the result will * be as if the source elements were first
> copied to an intermediate * location before being written into this
> buffer.
> If this work goes forward and this doc change is deemed necessary /
> worthwhile then a CSR will be filed.
>
The updated implementation with the fences looks good.
For the javadoc then I think it might be more consistent with the
existing API docs if you replaced "backing memory" with "backing array
or memory". It does add new testable assertions so a CSR is needed.
-Alan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20200523/bc74bf2b/attachment.htm>
More information about the nio-dev
mailing list