RFR: Unsafe comparison in ShenandoahHeap::evac_update_oop_ref

Roman Kennke rkennke at redhat.com
Wed Jan 24 20:55:47 UTC 2018


Ugh. Please push it. Thanks for fixing.

On Wed, Jan 24, 2018 at 5:42 PM, Aleksey Shipilev <shade at redhat.com> 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