changeset 2037:c1a0ede55d6f

7012493: 2/2 6849574/Test.java fails with Internal Error (src/share/vm/prims/jvmtiTagMap.cpp:3294) Summary: Refine assertion to work before VMThread has started. Reviewed-by: ysr, never, dholmes, acorn
author dcubed
date Wed, 19 Jan 2011 07:41:39 -0800
parents 633a44a9fc45
children 2f33b03bd915
files src/share/vm/prims/jvmtiTagMap.cpp
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/prims/jvmtiTagMap.cpp	Wed Jan 19 07:15:09 2011 -0800
+++ b/src/share/vm/prims/jvmtiTagMap.cpp	Wed Jan 19 07:41:39 2011 -0800
@@ -3290,7 +3290,11 @@
 
 
 void JvmtiTagMap::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* f) {
-  assert(SafepointSynchronize::is_at_safepoint(),
+  // No locks during VM bring-up (0 threads) and no safepoints after main
+  // thread creation and before VMThread creation (1 thread); initial GC
+  // verification can happen in that window which gets to here.
+  assert(Threads::number_of_threads() <= 1 ||
+         SafepointSynchronize::is_at_safepoint(),
          "must be executed at a safepoint");
   if (JvmtiEnv::environments_might_exist()) {
     JvmtiEnvIterator it;