RFR(S): 8200466: Revisit the setting of _transitive_interfaces in InstanceKlass

Calvin Cheung calvin.cheung at oracle.com
Fri Apr 27 20:54:09 UTC 2018


Hi Ioi,

Thanks for your review and investigation on JDK-8200078.

thanks,
Calvin

On 4/27/18, 12:27 PM, Ioi Lam wrote:
> Hi Calvin,
>
> The changes look good.
>
> Thanks
>
> - Ioi
>
>
> On 4/26/18 9:46 PM, Calvin Cheung wrote:
>> JBS: https://bugs.openjdk.java.net/browse/JDK-8200466
>>
>> webrev: http://cr.openjdk.java.net/~ccheung/8200466/webrev.00/
>>
>> This bug was discovered during the investigation of JDK-8200078 
>> <https://bugs.openjdk.java.net/browse/JDK-8200078>.
>>
>> I've included the following comment in classFileParser.cpp to 
>> summarize the change:
>>
>> // Delay the setting of _transitive_interfaces until after 
>> initialize_supers() in
>> // fill_instance_klass(). It is because the _transitive_interfaces 
>> may be shared with
>> // its _super. If an OOM occurs while loading the current klass, its 
>> _super field
>> // may not have been set. When GC tries to free the klass, the 
>> _transitive_interfaces
>> // may be deallocated mistakenly in 
>> InstanceKlass::deallocate_interfaces(). Subsequent
>> // dereferences to the deallocated _transitive_interfaces will result 
>> in a crash.
>>
>> Testing: (on Oracle platforms)
>>     hs-tier{1,2,3}
>>     closed (soon will be open) PCL (parallel class loading) tests
>>
>> thanks,
>> Calvin
>


More information about the hotspot-runtime-dev mailing list