changeset 14147:a0ea3a2f463a

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
author jcm
date Mon, 04 Apr 2016 02:07:28 -0700
parents 74bc7be0777b
children ea7254b1a81d
files src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Wed Mar 30 11:40:57 2016 +0200
+++ b/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.