--- a/hotspot/src/share/vm/prims/jvmtiEnv.cpp Wed Dec 21 18:22:14 2011 -0800
+++ b/hotspot/src/share/vm/prims/jvmtiEnv.cpp Thu Dec 22 12:50:42 2011 -0800
@@ -267,7 +267,10 @@
instanceKlassHandle ikh(current_thread, k_oop);
if (ikh->get_cached_class_file_bytes() == NULL) {
- // not cached, we need to reconstitute the class file from VM representation
+ // Not cached, we need to reconstitute the class file from the
+ // VM representation. We don't attach the reconstituted class
+ // bytes to the instanceKlass here because they have not been
+ // validated and we're not at a safepoint.
constantPoolHandle constants(current_thread, ikh->constants());
ObjectLocker ol(constants, current_thread); // lock constant pool while we query it