RFR: Unsafe comparison in ShenandoahHeap::evac_update_oop_ref
Zhengyu Gu
zgu at redhat.com
Wed Jan 24 16:45:26 UTC 2018
Looks good.
-Zhengyu
On 01/24/2018 11:42 AM, Aleksey Shipilev wrote:
> Traversal GC fails in ShenandoahHeap::evac_update_oop_ref when -XX:+VerifyStrictOopOperations is
> enabled, because we need:
>
> $ hg qdiff
> diff -r 21c595539121 src/hotspot/share/gc/shenandoah/shenandoahHeap.inline.hpp
> --- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.inline.hpp Wed Jan 24 17:32:27 2018 +0100
> +++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.inline.hpp Wed Jan 24 17:40:35 2018 +0100
> @@ -151,7 +151,7 @@
> forwarded_oop = evacuate_object(heap_oop, Thread::current(), evac);
> }
> oop prev = atomic_compare_exchange_oop(forwarded_oop, p, heap_oop);
> - if (prev == heap_oop) {
> + if (oopDesc::unsafe_equals(prev, heap_oop)) {
> return forwarded_oop;
> } else {
> return NULL;
>
> This actually affects partial too, which call this method in SVWB.
>
> Testing: failing test
>
> Thanks,
> -Aleksey
>
More information about the shenandoah-dev
mailing list