RFR: 8301222: Generalize check_release_entry in OopStorage
Kim Barrett
kbarrett at openjdk.org
Sat Mar 4 11:34:02 UTC 2023
The message from this sender included one or more files
which could not be scanned for virus detection; do not
open these files unless you are certain of the sender's intent.
----------------------------------------------------------------------
On Fri, 27 Jan 2023 10:19:39 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:
> When an oop handle is released to OopStorage, we want to check that its contents has been cleared appropriately, honouring the general contract with OopStorage. This is currently done with a raw access checking for null. However, the raw contents in memory might not be 0, just because the logical value is null. In particular, generational ZGC will have some low order colour bits set. This CR aims to address that.
Changes requested by kbarrett (Reviewer).
src/hotspot/share/gc/shared/collectedHeap.hpp line 453:
> 451: // some reason a context doesn't allow using the Access API, then this function
> 452: // explicitly checks if the given memory location contains a null value.
> 453: bool contains_null(const oop* p);
Seems like this should be virtual so it can be overridden by gen-zgc.
-------------
PR: https://git.openjdk.org/jdk/pull/12252
More information about the hotspot-gc-dev
mailing list