In redefine_single_class we have:
// Initialize the vtable and interface table after
// methods have been rewritten
// no exception should happen here since we explicitly
// do not check loader constraints.
// compare_and_normalize_class_versions has already checked:
// - classloaders unchanged, signatures unchanged
// - all instanceKlasses for redefined classes reused & contents updated
the_class->vtable().initialize_vtable(false, THREAD);
the_class->itable().initialize_itable(false, THREAD);
assert(!HAS_PENDING_EXCEPTION || (THREAD->pending_exception()->is_a(vmClasses::ThreadDeath_klass())), "redefine exception");
This code has been present since Java 6, where we introduced the "false" flag to not check constraints as we mustn't get an exception due to loader constraint violations. But this code is executed by the VMThread so ThreadDeath is not possible. What is possible, but not accounted for is OutOfMemoryError. But again this is the VMThread and so we should not be throwing exceptions in any case as they can never be processed.
// Initialize the vtable and interface table after
// methods have been rewritten
// no exception should happen here since we explicitly
// do not check loader constraints.
// compare_and_normalize_class_versions has already checked:
// - classloaders unchanged, signatures unchanged
// - all instanceKlasses for redefined classes reused & contents updated
the_class->vtable().initialize_vtable(false, THREAD);
the_class->itable().initialize_itable(false, THREAD);
assert(!HAS_PENDING_EXCEPTION || (THREAD->pending_exception()->is_a(vmClasses::ThreadDeath_klass())), "redefine exception");
This code has been present since Java 6, where we introduced the "false" flag to not check constraints as we mustn't get an exception due to loader constraint violations. But this code is executed by the VMThread so ThreadDeath is not possible. What is possible, but not accounted for is OutOfMemoryError. But again this is the VMThread and so we should not be throwing exceptions in any case as they can never be processed.
- relates to
-
JDK-8264051 Remove unused TRAPS parameters from runtime functions
-
- Resolved
-
-
JDK-8252685 APIs that require JavaThread should take JavaThread arguments
-
- Resolved
-
-
JDK-8264150 CDS dumping code calls TRAPS functions in VM thread
-
- Resolved
-