JDK-8230401 : ClassLoaderData::_keep_alive is read with wrong type in c2i entry barrier
Type:Bug
Component:hotspot
Sub-Component:runtime
Affected Version:14
Priority:P4
Status:Resolved
Resolution:Fixed
Submitted:2019-08-30
Updated:2019-09-26
Resolved:2019-09-04
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.
In the c2i entry barriers used by concurrent class unloading, the _keep_alive field is read with cmpl, but it is a short. This could cause undesired results, making a method look more alive than it really is.
Comments
Interestingly, it was changed int->s2 in JDK-8162553. This change reverts it back s2->int. Is it really safe? I would have expected this to be changed to s4 to be both more resilient against C compiler interpretation of what "int" is, and making cmpl work at the same time.