RFR: 8217309: ZGC: Fix ZNMethodTable corruption

Per Liden per.liden at oracle.com
Tue Jan 22 10:03:00 UTC 2019


Thanks Erik!

/Per

On 1/22/19 11:02 AM, Erik Österlund wrote:
> Hi Per,
> 
> Looks good.
> 
> Thanks,
> /Erik
> 
> On 2019-01-22 10:36, Per Liden wrote:
>> Calls to CollectedHeap::register_nmethod()/unregister_nmethod() should 
>> be protected by the CodeCache_lock (when called outside of 
>> safepoints). However, nmethod::make_unloaded() calls 
>> CollectedHeap::unregister_nmethod() without this lock held, which can 
>> corrupt the ZNMethodTable. Adding the lock is straight forward. The 
>> rest of the patch adjusts ZNMethodTable::unregister_nmethod() to never 
>> return false (which should never happen), adds the the proper asserts, 
>> etc.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8217309
>> Webrev: http://cr.openjdk.java.net/~pliden/8217309/webrev.0
>>
>> Testing: Tier1-4 on all archs. Tier-1-7 on Linux/x86
>>
>> (I'll update the bug with the proper fix-request label, justification, 
>> etc)
>>
>> /Per
> 



More information about the hotspot-gc-dev mailing list