changeset 54708:b7e6fc77c2f3

8223262: [AOT] jaotc crashes with assert(!(((ThreadShadow*)__the_thread__)->has_pending_exception())) failed: Should not allocate with exception pending Summary: Added missing checks for pending exception. Reviewed-by: never, gdub, dnsimon
author kvn
date Fri, 03 May 2019 09:07:30 -0700
parents 8390399b09f9
children 90855d9c3c39
files src/hotspot/share/jvmci/jvmciCompilerToVM.cpp
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp	Fri May 03 16:31:11 2019 +0200
+++ b/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp	Fri May 03 09:07:30 2019 -0700
@@ -557,7 +557,10 @@
   Klass* klass = cp->klass_at(index, CHECK_NULL);
   JVMCIKlassHandle resolved_klass(THREAD, klass);
   if (resolved_klass->is_instance_klass()) {
-    InstanceKlass::cast(resolved_klass())->link_class_or_fail(THREAD);
+    bool linked = InstanceKlass::cast(resolved_klass())->link_class_or_fail(CHECK_NULL);
+    if (!linked) {
+      return NULL;
+    }
   }
   JVMCIObject klassObject = JVMCIENV->get_jvmci_type(resolved_klass, JVMCI_CHECK_NULL);
   return JVMCIENV->get_jobject(klassObject);