RFR: 8180197: Failing assert: id must be initialized

Rickard Bäckman rickard.backman at oracle.com
Fri Jun 2 09:45:47 UTC 2017


Hi,

there is a locking / race in ciObjectFactory. The variables
_shared_ident_limit and _shared_ci_metadata are supposed to be protected
by the volatile _initialized. However since we do double checked locking
on at least some platforms we can have a race where _initialized is true
but _shared_ident_limit has not yet been updated.

Since this code is only run when the compiler threads are starting,
replacing the double checked locking with just check under lock would
solve the problem. The code runs once per thread and can't be considered
performance critical.

webrev: http://cr.openjdk.java.net/~rbackman/8180197/
bug: https://bugs.openjdk.java.net/browse/JDK-8180197

/R


More information about the hotspot-compiler-dev mailing list