8139801: Error message from validation check has wrong order on Windows
authorsangheki
Mon, 26 Oct 2015 08:34:25 -0700
changeset 33600 922600753f71
parent 33597 5d42601232b1
child 33601 9d0838128dd9
8139801: Error message from validation check has wrong order on Windows Summary: Added flushing stdout and stderr before exit or abort Reviewed-by: coleenp, cjplummer
hotspot/src/share/vm/prims/jni.cpp
hotspot/src/share/vm/runtime/java.cpp
--- a/hotspot/src/share/vm/prims/jni.cpp	Fri Oct 23 14:33:19 2015 +0300
+++ b/hotspot/src/share/vm/prims/jni.cpp	Mon Oct 26 08:34:25 2015 -0700
@@ -4061,6 +4061,10 @@
     OrderAccess::release_store(&vm_created, 0);
   }
 
+  // Flush stdout and stderr before exit.
+  fflush(stdout);
+  fflush(stderr);
+
   return result;
 
 }
--- a/hotspot/src/share/vm/runtime/java.cpp	Fri Oct 23 14:33:19 2015 +0300
+++ b/hotspot/src/share/vm/runtime/java.cpp	Mon Oct 26 08:34:25 2015 -0700
@@ -575,6 +575,11 @@
 void vm_abort(bool dump_core) {
   vm_perform_shutdown_actions();
   os::wait_for_keypress_at_exit();
+
+  // Flush stdout and stderr before abort.
+  fflush(stdout);
+  fflush(stderr);
+
   os::abort(dump_core);
   ShouldNotReachHere();
 }