[jdk17] RFR: 8269066: assert(ZAddress::is_marked(addr)) failed: Should be marked

Per Liden pliden at openjdk.java.net
Wed Jun 23 10:17:26 UTC 2021


On Tue, 22 Jun 2021 14:57:12 GMT, Per Liden <pliden at openjdk.org> wrote:

> Please review this patch to fix an issue in ZBarrierSetC2.
> 
> This problem was spotted when running an updated version of test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/phantom001/phantom001.java, which used `PhantomReference.refersTo()` (see JIRA).
> 
> The root cause of the problem is that `set_barrier_data()` in `zBarrierSetC2.cpp` only checks for `ON_WEAK_OOP_REF` and otherwise defaults to `ON_STRONG_OOP_REF`. With the introduction of `Reference.refersTo()` and `PhantomReference.refersTo()` it should also check for `ON_PHANTOM_OOP_REF` and `AS_NO_KEEPALIVE`, but that was missed. As a result, we generate calls to the wrong load barrier type.
> 
> Testing:
>   * Tier1-7 using ZGC on Linux/x86.
>   * 100+ iterations of test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/phantom001/phantom001.java (updated version)
>   * Manual ad-hoc testing to verify that we generate the correct load barrier.

Thanks all for reviewing!

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

PR: https://git.openjdk.java.net/jdk17/pull/118



More information about the hotspot-gc-dev mailing list