7130319: C2: running with -XX:+PrintOptoAssembly crashes the VM with assert(false) failed: bad tag in log
authordlong
Tue, 24 Jan 2012 18:00:54 -0500
changeset 11727 c5dfa2639359
parent 11457 92228d5090dd
child 11728 277bd1ee7a33
7130319: C2: running with -XX:+PrintOptoAssembly crashes the VM with assert(false) failed: bad tag in log Summary: Relax assert to allow the VMThread to close the log while the compiler thread is still writing to it. Reviewed-by: dholmes, never Contributed-by: dean.long@oracle.com
hotspot/src/share/vm/utilities/xmlstream.cpp
--- a/hotspot/src/share/vm/utilities/xmlstream.cpp	Fri Jan 13 06:18:47 2012 -0800
+++ b/hotspot/src/share/vm/utilities/xmlstream.cpp	Tue Jan 24 18:00:54 2012 -0500
@@ -192,8 +192,11 @@
     _element_close_stack_ptr = cur_tag + strlen(cur_tag) + 1;
     _element_depth -= 1;
   }
-  if (bad_tag && !VMThread::should_terminate() && !is_error_reported())
+  if (bad_tag && !VMThread::should_terminate() && !VM_Exit::vm_exited() &&
+      !is_error_reported())
+  {
     assert(false, "bad tag in log");
+  }
 }
 #endif