--- a/hotspot/src/share/vm/prims/jvmtiEnv.cpp Wed Feb 15 17:26:37 2017 -0800
+++ b/hotspot/src/share/vm/prims/jvmtiEnv.cpp Wed Feb 15 22:19:13 2017 -0500
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1796,6 +1796,13 @@
}
}
+ if (initial_object != NULL) {
+ oop init_obj = JNIHandles::resolve_external_guard(initial_object);
+ if (init_obj == NULL) {
+ return JVMTI_ERROR_INVALID_OBJECT;
+ }
+ }
+
Thread *thread = Thread::current();
HandleMark hm(thread);
KlassHandle kh (thread, k_oop);