RFR: 8261127: Cleanup THREAD/TRAPS/CHECK usage in CDS code
Coleen Phillimore
coleenp at openjdk.java.net
Thu Feb 4 23:42:44 UTC 2021
On Thu, 4 Feb 2021 23:17:20 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> src/hotspot/share/memory/heapShared.cpp line 700:
>>
>>> 698: InstanceKlass* k = SystemDictionaryShared::find_builtin_class(klass_name);
>>> 699: assert(k != NULL && k->is_shared_boot_class(), "sanity");
>>> 700: resolve_classes_for_subgraph_of(k, THREAD /* exceptions are ignored */);
>>
>> They're not ignored though, they're passed to the caller of this function. Since this function passes TRAPS, the caller should have a CHECK/CATCH or handle the pending exception.
>
> These _are_ passed to the callers of this function as THREAD->_pending_exception will have an something in it.
Exceptions aren't ignored, they are cleared by the callees, so you don't expect any exceptions, which is CATCH.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2397
More information about the hotspot-runtime-dev
mailing list