RFR: 8212181: ZGC: Fix incorrect root iteration in ZHeapIterator

Per Liden per.liden at oracle.com
Mon Oct 15 14:44:44 UTC 2018


The ZHeapIterator should not make callbacks to the user supplied 
ObjectClosure while iterating over roots. Instead all roots should be 
pushed to the stack first, before any call to the user supplied 
ObjectClosure is made. This is needed since the user supplied 
ObjectClosure could otherwise modify the root set (e.g. the JVMTI 
TagMap) while we're iterating over it, which can lead to memory corruption.

Bug: https://bugs.openjdk.java.net/browse/JDK-8212181
Webrev: http://cr.openjdk.java.net/~pliden/8212181/webrev.0

/Per


More information about the hotspot-gc-dev mailing list