Compressed oops are copied bytewise on windows amd64.

Siebenborn, Axel axel.siebenborn at sap.com
Thu Oct 13 00:24:52 PDT 2011


Hi all,
on windows-amd64 the interpreter copies compressed oops using memmove.
However, memmove is not thread safe and might copy bytewise.
Another thread can see a partly copied compressed oop.
I added a small test, where a second java thread reads from the array, while the first copies.

The second thread could also be the parallel marking of the CMS.
I prepared  the following webrev:
http://www.sapjvm.com/as/webrevs/atomic_array_copy/

The suggested fix replaces the memmove by a simple copy loop.

If someone provides me a BugID, I'll change the webrev accordingly and add the test.
Regards,
Axel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20111013/b776426d/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestConjointAtomicArraycopy.java
Type: application/octet-stream
Size: 892 bytes
Desc: TestConjointAtomicArraycopy.java
Url : http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20111013/b776426d/TestConjointAtomicArraycopy.java 


More information about the hotspot-runtime-dev mailing list