JDK-8361952 : Installation of MethodData::extra_data_lock() misses synchronization on reader side
Type:Bug
Component:hotspot
Sub-Component:compiler
Affected Version:25
Priority:P2
Status:Resolved
Resolution:Fixed
Submitted:2025-07-11
Updated:2025-09-02
Resolved:2025-07-14
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 MethodData::extra_data_lock(), the initial read of the lock variable should use load_acquire because otherwise the reader might receive an incorrectly initialized Mutex.
Comments
Added noreg-trivial because the fix can't break anything, not because issue is trivial. The noreg-hard also would fit.
02-09-2025
A pull request was submitted for review.
Branch: jdk25
URL: https://git.openjdk.org/jdk/pull/26326
Date: 2025-07-15 18:06:19 +0000
ILW = Potential crash due to uninitialized mutex, never observed, no workaround = HLH = P2
Feel free to adjust the priority. I think the fix should be backported to JDK 25.
11-07-2025
A pull request was submitted for review.
Branch: master
URL: https://git.openjdk.org/jdk/pull/26262
Date: 2025-07-11 09:47:05 +0000