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

Per Liden per.liden at oracle.com
Tue Oct 16 11:46:41 UTC 2018


Thanks Erik!

/Per

On 10/15/2018 04:47 PM, Erik Österlund wrote:
> Hi Per,
> 
> Looks good.
> 
> Thanks,
> /Erik
> 
> On 2018-10-15 16:44, Per Liden wrote:
>> 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