RFR: Check that pointer is in heap before checking the affiliation of owning region
Roman Kennke
rkennke at openjdk.java.net
Thu Jul 22 16:08:25 UTC 2021
On Thu, 22 Jul 2021 15:48:08 GMT, William Kemper <wkemper at openjdk.org> wrote:
> This is a small bug fix that was meant to go in with the concurrent remembered set scanning changes
Changes requested by rkennke (Lead).
src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 756:
> 754:
> 755: bool ShenandoahHeap::is_in_young(const void* p) const {
> 756: return is_in(p) && heap_region_containing(p)->affiliation() == ShenandoahRegionAffiliation::YOUNG_GENERATION;
Is there a valid case where we would check off-heap pointers? If not, then better do this as assert?
src/hotspot/share/gc/shenandoah/shenandoahReferenceProcessor.cpp line 399:
> 397: // When this reference was discovered, it would not have been marked. If it ends up surviving
> 398: // the cycle, we need to dirty the card if the reference is old and the referent is young. Note
> 399: // that if the reference is not dropped, then its pointer to the referent will be cleared before
Those changes seem unrelated.
-------------
PR: https://git.openjdk.java.net/shenandoah/pull/52
More information about the shenandoah-dev
mailing list