[10] RFR(S): 8187780: VM crashes while generating replay compilation file

Tobias Hartmann tobias.hartmann at oracle.com
Thu Sep 21 12:37:09 UTC 2017


Hi,

please review the following patch:
https://bugs.openjdk.java.net/browse/JDK-8187780
http://cr.openjdk.java.net/~thartmann/8187780/webrev.00/

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.

Thanks,
Tobias


More information about the hotspot-compiler-dev mailing list