-
Bug
-
Resolution: Fixed
-
P4
-
21, 22
-
b20
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8329499 | 21.0.4-oracle | Thomas Schatzl | P4 | Resolved | Fixed | b02 |
JDK-8330659 | 21.0.4 | Goetz Lindenmaier | P4 | Resolved | Fixed | b01 |
For every bucket, it loads the head and the next pointers with unordered loads; the store to the head pointer in enter() is also unordered wrt to the next pointer and that load, so stub_containing() could read garbage for the next field and return a wrong result.
Found by code inspection for
It's very unlikely to do so (and there may be some proof like "between the store and the load there almost likely is some intervening synchronization"), and probably never happened so far.
The simplest thing is to make this ordering explicit (and remove the
// Note: No locking needed since any change to the data structure
// happens with an atomic store into it (we don't care about
// consistency with the _number_of_vtable_stubs counter).
comment which is wrong about the "no synchronization" needed.)
- backported by
-
JDK-8329499 VtableStubs::stub_containing() table load not ordered wrt to stores
- Resolved
-
JDK-8330659 VtableStubs::stub_containing() table load not ordered wrt to stores
- Resolved
- relates to
-
JDK-8326092 Pause Remark sometimes has extremely long pause times on class unloading
- Closed
-
JDK-8317527 Make VtableStubs::entry_point() lock free
- Closed
- links to
-
Commit openjdk/jdk21u-dev/5a94e485
-
Commit openjdk/jdk/c566dfcc
-
Review openjdk/jdk21u-dev/446
-
Review openjdk/jdk/16056