RFR: 8301248: InstanceRefKlass::trace_reference_gc

Erik Österlund eosterlund at openjdk.org
Fri Jan 27 15:52:54 UTC 2023


The InstanceRefKlass::trace_reference_gc function is called when using oop_iterate on a reference object. Since oop_iterate is a general iterator that can be used for anything, including verification code, it would be desirable for this code to not have subtle side effects. We currently apply load barriers which "fix" pointers in the heap. As a result, verification code that was meant to detect bugs, can end up fixing and hiding the bug. This CR aims to address this by limiting the logging to addresses, and not following them.

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

Commit messages:
 - 8301248: InstanceRefKlass::trace_reference_gc

Changes: https://git.openjdk.org/jdk/pull/12258/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12258&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8301248
  Stats: 18 lines in 1 file changed: 6 ins; 2 del; 10 mod
  Patch: https://git.openjdk.org/jdk/pull/12258.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/12258/head:pull/12258

PR: https://git.openjdk.org/jdk/pull/12258


More information about the hotspot-dev mailing list