8067247: Crash: assert(method_holder->data() == 0 ...) failed: a) MT-unsafe modification of inline cache
Summary: Made invoker LambdaForm instance & its compiled form lifetime tightly coupled.
Reviewed-by: vlivanov
--- a/jdk/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java Wed Mar 30 11:40:57 2016 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java Mon Apr 04 02:07:28 2016 -0700
@@ -655,6 +655,8 @@
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.