mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
6800721: 3/4 JavaThread::jvmti_thread_state() and JvmtiThreadState::state_for() robustness
Check for NULL return values from jvmti_thread_state() and state_for() and return a JVM TI error code as appropriate. Reviewed-by: coleenp, swamyv
This commit is contained in:
parent
74a99e1e82
commit
56fe18e375
7 changed files with 47 additions and 7 deletions
|
@ -831,6 +831,9 @@ jvmtiError VM_RedefineClasses::load_new_class_versions(TRAPS) {
|
|||
ResourceMark rm(THREAD);
|
||||
|
||||
JvmtiThreadState *state = JvmtiThreadState::state_for(JavaThread::current());
|
||||
// state can only be NULL if the current thread is exiting which
|
||||
// should not happen since we're trying to do a RedefineClasses
|
||||
guarantee(state != NULL, "exiting thread calling load_new_class_versions");
|
||||
for (int i = 0; i < _class_count; i++) {
|
||||
oop mirror = JNIHandles::resolve_non_null(_class_defs[i].klass);
|
||||
// classes for primitives cannot be redefined
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue