changeset 5244:40459e83f8c9

8043413: REGRESSION: Hotspot causes segmentation fault in jdk8ux, but not in jdk7ux Summary: long series of lambda form calls trigger stack overflow in c2 Reviewed-by: kvn, vlivanov
author roland
date Mon, 02 Jun 2014 10:01:15 +0200
parents c02c67eb03ae
children 4c218194cc6c
files src/share/vm/opto/bytecodeInfo.cpp
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/opto/bytecodeInfo.cpp	Wed Sep 24 13:49:01 2014 +0400
+++ b/src/share/vm/opto/bytecodeInfo.cpp	Mon Jun 02 10:01:15 2014 +0200
@@ -364,11 +364,14 @@
     set_msg("not an accessor");
     return false;
   }
+
+  // Limit inlining depth in case inlining is forced or
+  // _max_inline_level was increased to compensate for lambda forms.
+  if (inline_level() > MaxForceInlineLevel) {
+    set_msg("MaxForceInlineLevel");
+    return false;
+  }
   if (inline_level() > _max_inline_level) {
-    if (callee_method->force_inline() && inline_level() > MaxForceInlineLevel) {
-      set_msg("MaxForceInlineLevel");
-      return false;
-    }
     if (!callee_method->force_inline() || !IncrementalInline) {
       set_msg("inlining too deep");
       return false;