# HG changeset patch # User kvn # Date 1556899650 25200 # Node ID b7e6fc77c2f388654e210563a59fbc2d4658b5eb # Parent 8390399b09f9c56c1e6c89f83a995d0c8cc3ea3a 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 diff -r 8390399b09f9 -r b7e6fc77c2f3 src/hotspot/share/jvmci/jvmciCompilerToVM.cpp --- 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);