Merge
authornever
Wed, 16 Aug 2017 20:57:00 +0000
changeset 46822 5778a97eb82f
parent 46819 780e16a64a50 (current diff)
parent 46821 0a12cf4ae24e (diff)
child 46823 d38520dd1ec3
child 46955 c5a455ec08c0
child 46977 9e8d0f0de00e
Merge
--- a/hotspot/src/share/vm/opto/doCall.cpp	Wed Aug 16 21:47:17 2017 +0200
+++ b/hotspot/src/share/vm/opto/doCall.cpp	Wed Aug 16 20:57:00 2017 +0000
@@ -719,6 +719,7 @@
   GrowableArray<const Type*>* extypes = new (C->node_arena()) GrowableArray<const Type*>(C->node_arena(), 8, 0, NULL);
   GrowableArray<int>* saw_unloaded = new (C->node_arena()) GrowableArray<int>(C->node_arena(), 8, 0, 0);
 
+  bool default_handler = false;
   for (; !handlers.is_done(); handlers.next()) {
     ciExceptionHandler* h        = handlers.handler();
     int                 h_bci    = h->handler_bci();
@@ -741,6 +742,14 @@
     // Note:  It's OK if the BCIs repeat themselves.
     bcis->append(h_bci);
     extypes->append(h_extype);
+    if (h_bci == -1) {
+      default_handler = true;
+    }
+  }
+
+  if (!default_handler) {
+    bcis->append(-1);
+    extypes->append(TypeOopPtr::make_from_klass(env()->Throwable_klass())->is_instptr());
   }
 
   int len = bcis->length();
--- a/hotspot/src/share/vm/opto/output.cpp	Wed Aug 16 21:47:17 2017 +0200
+++ b/hotspot/src/share/vm/opto/output.cpp	Wed Aug 16 20:57:00 2017 +0000
@@ -1636,6 +1636,7 @@
       }
 
       // Set the offset of the return from the call
+      assert(handler_bcis.find(-1) != -1, "must have default handler");
       _handler_table.add_subtable(call_return, &handler_bcis, NULL, &handler_pcos);
       continue;
     }