--- old/src/share/vm/interpreter/interpreterRuntime.cpp	2010-12-01 19:19:39.803636958 +0100
+++ new/src/share/vm/interpreter/interpreterRuntime.cpp	2010-12-01 19:19:39.736136408 +0100
@@ -1193,9 +1193,18 @@
       method->set_signature_handler(_handlers->at(handler_index));
     }
   }
-  assert(method->signature_handler() == Interpreter::slow_signature_handler() ||
-         _handlers->find(method->signature_handler()) == _fingerprints->find(Fingerprinter(method).fingerprint()),
-         "sanity check");
+#ifdef ASSERT
+  {
+    // '_handlers' and '_fingerprints' are 'GrowableArray's and are NOT synchronized
+    // in any way if accessed from multiple threads. To avoid races with another
+    // thread which may change the arrays in the above, mutex protected block, we
+    // have to protect this read access here with the same mutex as well!
+    MutexLocker mu(SignatureHandlerLibrary_lock);
+    assert(method->signature_handler() == Interpreter::slow_signature_handler() ||
+           _handlers->find(method->signature_handler()) == _fingerprints->find(Fingerprinter(method).fingerprint()),
+           "sanity check");
+  }
+#endif
 }
 
 
