JDK-8166229 : Eliminate ParNew's use of klass_or_null()
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2016-09-17
  • Updated: 2021-02-05
  • Resolved: 2016-09-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9 Other
8u301Fixed 9 b139Fixed openjdk8u292Fixed
Description
Part of addressing JDK-8160369 involves examining and possibly fixing all uses of Klass::klass_or_null(). ParNew uses klass_or_null() in a few places. However, all of these uses of klass_or_null() are semantically incorrect.

ParNew sometimes collects a list of some from-space objects, using the klass "field" as the next link in the list. JDK-6964458 introduced set_klass_to_list_ptr() and list_ptr_from_klass() to package up this usage. These were used to replace the direct uses of set_klass() and klass() respectively. However, uses of klass_or_null() were not updated, even though in the places where it is being used (by ParNew) the object it is being applied to is in that linked-through-klass list, so the result is never a Klass, but instead is the next element in the list, a special list marker (BUSY), or NULL.