RFR: 8212184: Incorrect oop ref strength used for referents in FinalReference
Kim Barrett
kim.barrett at oracle.com
Mon Oct 15 18:55:17 UTC 2018
> On Oct 15, 2018, at 10:42 AM, Per Liden <per.liden at oracle.com> wrote:
>
> AccessBarrierSupport::resolve_unknown_oop_ref_strength() returns an incorrect oop ref strength for referents in FinalReference objects. It currently returns ON_WEAK_OOP_REF when it should return ON_STRONG_OOP_REF. This is not really an issue for any GC except ZGC when using the ZHeapIterator to walk the heap while resurrection is blocked.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8212184
> Webrev: http://cr.openjdk.java.net/~pliden/8212184/webrev.0
>
> /Per
src/hotspot/share/gc/shared/accessBarrierSupport.cpp
32 if (!java_lang_ref_Reference::is_referent_field(base, offset) ||
33 java_lang_ref_Reference::is_final(base)) {
34 ds |= ON_STRONG_OOP_REF;
This doesn't seem right. Doesn't this give the wrong answer for G1?
I'm not even sure "strong" is the right answer for ZGC in the
described context.
What am I missing?
More information about the hotspot-gc-dev
mailing list