8047212: runtime/ParallelClassLoading/bootstrap/random/inner-complex assert(ObjectSynchronizer::verify_objmon_isinpool(inf)) failed: monitor is invalid

Fix race between ObjectMonitor alloc and verification code; teach SA about "static pointer volatile" fields.

Reviewed-by: cvarming, dholmes, sspitsyn, coleenp
This commit is contained in:
Daniel D. Daugherty 2015-10-24 15:44:08 -07:00
parent ed82cd0ee8
commit cb0500e51d
3 changed files with 70 additions and 50 deletions

View file

@ -140,7 +140,7 @@ class ObjectSynchronizer : AllStatic {
// global list of blocks of monitors
// gBlockList is really PaddedEnd<ObjectMonitor> *, but we don't
// want to expose the PaddedEnd template more than necessary.
static ObjectMonitor * gBlockList;
static ObjectMonitor * volatile gBlockList;
// global monitor free list
static ObjectMonitor * volatile gFreeList;
// global monitor in-use list, for moribund threads,