[9] RFR(S): 8164091: VM fails during startup with "assert(resolved_method->method_holder()->is_linked()) failed: must be linked"

Tobias Hartmann tobias.hartmann at oracle.com
Wed Aug 17 06:14:18 UTC 2016


Thanks for the review, Dean and David!

Best regards,
Tobias

On 17.08.2016 01:52, David Holmes wrote:
> Looks good Tobias! :)
> 
> Thanks,
> David
> 
> On 16/08/2016 10:52 PM, Tobias Hartmann wrote:
>> Hi,
>>
>> please review the following patch:
>> https://bugs.openjdk.java.net/browse/JDK-8164091
>> http://cr.openjdk.java.net/~thartmann/8164091/webrev.00/
>>
>> During startup, we initialize some java.lang.* classes in Threads::initialize_java_lang_classes(). While trying to link the method java.lang.Class::forName(), we fail during adapter creation in Method::make_adapters() because there is not enough space in the code cache:
>>   AdapterHandlerEntry* adapter = AdapterHandlerLibrary::get_adapter(mh);
>>   if (adapter == NULL ) {
>>     THROW_MSG_NULL(vmSymbols::java_lang_VirtualMachineError(), "Out of space in CodeCache for adapters");
>>   }
>>
>> After calling the initializer of java.lang.Throwable, we try to resolve a virtual method in the interpreter and fail because java.lang.Class is not linked (we threw the original exception because linking failed). We should not create exceptions during VM initialization but bail out via vm_exit_during_initialization().
>>
>> Tested with regression test, JPRT and RBT (running).
>>
>> Thanks,
>> Tobias
>>


More information about the hotspot-dev mailing list