RFR (XS) 8232729: Shenandoah: assert ShenandoahHeap::cas_oop addresses are aligned

Roman Kennke rkennke at redhat.com
Mon Oct 21 17:18:41 UTC 2019


Yup. More asserts are always good. :-)

Roman

> RFE:
>   https://bugs.openjdk.java.net/browse/JDK-8232729
> 
> Fix:
>   https://cr.openjdk.java.net/~shade/8232729/webrev.01/
> 
> Current ShenandoahHeap::cas_oop routines perform CASes on given address, hoping the hardware would
> handle it properly. In most cases, this is guaranteed by callers who pass aligned addresses to it:
> those are aligned narrowOop*/oop* fields or the roots that we can update concurrently.
> 
> However, we should assert the alignment directly to catch bugs. This would fail the asserts with
> proper message rather than obscure SIGBUS on some platforms like AArch64. These new asserts are
> known to legitimately fail with Traversal (JDK-8232730) on x86_64 and with jcstress on AArch64
> (JDK-8232712), so I am going to push this after the fixes land to ensure clean test results.
> 
> Testing: {x86_64, x86_32} hotspot_gc_shenandoah; x86_64 tier1 with Shenandoah (running)
> 




More information about the hotspot-gc-dev mailing list