[lworld] Integrated: 8247746: [lworld] TestNullableArray::test78 fails with ZGC due to incorrect result

Tobias Hartmann thartmann at openjdk.java.net
Wed Jun 17 12:02:41 UTC 2020


On Wed, 17 Jun 2020 10:05:05 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

> A missing control dependency between an oop load from an array and the corresponding "is-not-flat" check led to
> re-ordering of the load to before the check. Although the result is only used in the "not-flat" case, ZGC load barriers
> are still executed on that "oop" that is actually a non-oop field of the flattened inline type array element. In rare
> cases, the following barrier code screws up the contents of that field:  #0  0x00007fa990daf32e in
> Atomic::PlatformCmpxchg<8ul>::operator()<unsigned long> (this=<optimized out>, exchange_value=<optimized out>,
> compare_value=<optimized out>,
>     dest=0x100000f17350) at /oracle/valhalla_int/open/src/hotspot/os_cpu/linux_x86/atomic_linux_x86.hpp:126
> #1  Atomic::CmpxchgImpl<unsigned long, unsigned long, unsigned long, void>::operator() (this=<optimized out>,
> order=memory_order_conservative, exchange_value=21990232555242,
>     compare_value=<optimized out>, dest=0x100000f17350) at
>     /oracle/valhalla_int/open/src/hotspot/share/runtime/atomic.hpp:745
> #2  Atomic::cmpxchg<unsigned long, unsigned long, unsigned long> (order=memory_order_conservative,
> exchange_value=21990232555242, compare_value=<optimized out>, dest=0x100000f17350)
>     at /oracle/valhalla_int/open/src/hotspot/share/runtime/atomic.hpp:721
> #3  ZBarrier::self_heal<&ZBarrier::is_good_or_null_fast_path> (heal_addr=<optimized out>, addr=<optimized out>,
> p=0x100000f17350)
>     at /oracle/valhalla_int/open/src/hotspot/share/gc/z/zBarrier.inline.hpp:120
> #4  ZBarrier::self_heal<&ZBarrier::is_good_or_null_fast_path> (heal_addr=<optimized out>, addr=<optimized out>,
> p=0x100000f17350)
>     at /oracle/valhalla_int/open/src/hotspot/share/gc/z/zBarrier.inline.hpp:106
> #5  ZBarrier::barrier<&ZBarrier::is_good_or_null_fast_path, &ZBarrier::load_barrier_on_oop_slow_path> (o=...,
> p=<optimized out>)
>     at /oracle/valhalla_int/open/src/hotspot/share/gc/z/zBarrier.inline.hpp:152
> #6  ZBarrier::load_barrier_on_oop_field_preloaded (o=..., p=0x100000f17350) at
> /oracle/valhalla_int/open/src/hotspot/share/gc/z/zBarrier.inline.hpp:236 #7
> ZBarrierSetRuntime::load_barrier_on_oop_field_preloaded (o=<optimized out>, p=0x100000f17350) at
> /oracle/valhalla_int/open/src/hotspot/share/gc/z/zBarrierSetRuntime.cpp:30 #8  0x00007fa9851a8774 in ?? () #9
> 0x0000000000000000 in ?? ()

This pull request has now been integrated.

Changeset: dc585c25
Author:    Tobias Hartmann <thartmann at openjdk.org>
URL:       https://git.openjdk.java.net/valhalla/commit/dc585c25
Stats:     2 lines in 1 file changed: 1 ins; 0 del; 1 mod

8247746: [lworld] TestNullableArray::test78 fails with ZGC due to incorrect result

-------------

PR: https://git.openjdk.java.net/valhalla/pull/87


More information about the valhalla-dev mailing list