RFR(S): 8187780: VM crashes while generating replay compilation file
tobias.hartmann at oracle.com
Fri Sep 22 04:53:52 UTC 2017
thanks for the review!
On 21.09.2017 17:42, Vladimir Kozlov wrote:
> Looks good.
> On 9/21/17 5:37 AM, Tobias Hartmann wrote:
>> please review the following patch:
>> Creation of a replay compilation file crashes the VM due to the following problems:
>> (1) ciInstanceKlass.cpp:
>> java_lang_String::as_quoted_ascii(value) may return NULL if the String is empty (see 'emptyString' in
>> TestDumpReplay.java). I added a NULL check.
>> (2) bytecodeInfo.cpp:
>> The liveness of the InlineTree object is limited by the scope of a ResourceMark. With incremental inlining, the
>> InlineTree is created within the scope of the ResourceMark is in Compile::Optimize() whereas the replay compilation
>> file is created in the scope of the caller method Compile::Compile() -> ciEnv::dump_replay_data(). We crash in
>> InlineTree::dump_replay_data() because the object was released. I changed the implementation to allocate the object in
>> the comp_arena.
>> TestDumpReplay.java triggers both crashes.
>> Tested with the hotspot testset on JPRT.
More information about the hotspot-compiler-dev