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

Per Liden pliden at openjdk.java.net
Wed Jun 23 10:17:27 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.

This pull request has now been integrated.

Changeset: 8128ca13
Author:    Per Liden <pliden at openjdk.org>
URL:       https://git.openjdk.java.net/jdk17/commit/8128ca1381a058cb5ed3775bafa2bc681f8fe2c1
Stats:     13 lines in 1 file changed: 10 ins; 0 del; 3 mod

8269066: assert(ZAddress::is_marked(addr)) failed: Should be marked

Reviewed-by: eosterlund, stefank, kbarrett, tschatzl

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

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


More information about the hotspot-gc-dev mailing list