Found with code review.
The space allocated to store the temporal info about the oop maps is allocated to fit the non-contended oops only. Should any @Contended oop emerge, it will overrun the array and corrupt something else.
unsigned int nonstatic_oop_count = fac->count[NONSTATIC_OOP] - fac_contended.count[NONSTATIC_OOP];
...
int* nonstatic_oop_offsets;
nonstatic_oop_offsets = NEW_RESOURCE_ARRAY_IN_THREAD(
THREAD, int, nonstatic_oop_count + 1);
The space allocated to store the temporal info about the oop maps is allocated to fit the non-contended oops only. Should any @Contended oop emerge, it will overrun the array and corrupt something else.
unsigned int nonstatic_oop_count = fac->count[NONSTATIC_OOP] - fac_contended.count[NONSTATIC_OOP];
...
int* nonstatic_oop_offsets;
nonstatic_oop_offsets = NEW_RESOURCE_ARRAY_IN_THREAD(
THREAD, int, nonstatic_oop_count + 1);
- duplicates
-
JDK-8015270 @Contended: fix multiple issues in the layout code
- Closed