hotspot/src/share/vm/oops/instanceKlass.cpp
changeset 24658 e41df2fc6e87
parent 24424 2658d7834c6e
child 24828 dd5406c950a1
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp	Tue May 20 20:35:39 2014 +0200
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp	Wed May 21 14:36:18 2014 -0400
@@ -1273,6 +1273,12 @@
 
 
 void InstanceKlass::methods_do(void f(Method* method)) {
+  // Methods aren't stable until they are loaded.  This can be read outside
+  // a lock through the ClassLoaderData for profiling
+  if (!is_loaded()) {
+    return;
+  }
+
   int len = methods()->length();
   for (int index = 0; index < len; index++) {
     Method* m = methods()->at(index);