RFR(S): 8187780: VM crashes while generating replay compilation file
tobias.hartmann at oracle.com
Thu Sep 21 12:37:09 UTC 2017
please review the following patch:
Creation of a replay compilation file crashes the VM due to the following problems:
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.
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
TestDumpReplay.java triggers both crashes.
Tested with the hotspot testset on JPRT.
More information about the hotspot-compiler-dev