changeset 51698:d058b410af0a

8210236: Prepare ciReceiverTypeData::translate_receiver_data_from for concurrent class unloading Reviewed-by: coleenp, roland
author eosterlund
date Mon, 10 Sep 2018 11:24:26 +0200
parents f7563db3ae1b
children 72bdaf11dd6a
files src/hotspot/share/ci/ciMethodData.cpp
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/ci/ciMethodData.cpp	Mon Sep 10 10:02:48 2018 +0200
+++ b/src/hotspot/share/ci/ciMethodData.cpp	Mon Sep 10 11:24:26 2018 +0200
@@ -187,8 +187,13 @@
   for (uint row = 0; row < row_limit(); row++) {
     Klass* k = data->as_ReceiverTypeData()->receiver(row);
     if (k != NULL) {
-      ciKlass* klass = CURRENT_ENV->get_klass(k);
-      set_receiver(row, klass);
+      if (k->is_loader_alive()) {
+        ciKlass* klass = CURRENT_ENV->get_klass(k);
+        set_receiver(row, klass);
+      } else {
+        // With concurrent class unloading, the MDO could have stale metadata; override it
+        clear_row(row);
+      }
     }
   }
 }