8067247: Crash: assert(method_holder->data() == 0 ...) failed: a) MT-unsafe modification of inline cache

Made invoker LambdaForm instance & its compiled form lifetime tightly coupled.

Reviewed-by: vlivanov
This commit is contained in:
Jamsheed Mohammed C M 2016-04-04 02:07:28 -07:00
parent 892fa77ffa
commit 8496a7c536

View File

@ -655,6 +655,8 @@ class InvokerBytecodeGenerator {
mv.visitAnnotation(DONTINLINE_SIG, true);
}
constantPlaceholder(lambdaForm); // keep LambdaForm instance & its compiled form lifetime tightly coupled.
if (lambdaForm.customized != null) {
// Since LambdaForm is customized for a particular MethodHandle, it's safe to substitute
// receiver MethodHandle (at slot #0) with an embedded constant and use it instead.