JDK-8036672 : G1: alloc_purpose in copy_to_survivor_space() used incorrectly
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 8u20,9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-03-05
  • Updated: 2014-07-29
  • Resolved: 2014-03-17
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
8u20Fixed 9 b08Fixed
Related Reports
Blocks :  
Description
In G1ParScanThreadState::copy_to_survivor_space(), alloc_purpose is just seen as a hint to allocate(). E.g. a request for an allocation in survivor region might end up being an allocation in an old region (if we're out of survivor regions). However, the alloc_purpose flags is later also used (incorrectly) to determine where the object was actually allocated to 1) determine if the object age should be adjusted and 2) for undoing the allocation.

After the object has been allocated the alloc_purpose flags should be updated to reflect the actual location of the object.