--- a/hotspot/src/share/vm/prims/jni.cpp Thu Oct 22 11:33:51 2015 -0400
+++ b/hotspot/src/share/vm/prims/jni.cpp Mon Oct 26 18:27:33 2015 +0100
@@ -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 Thu Oct 22 11:33:51 2015 -0400
+++ b/hotspot/src/share/vm/runtime/java.cpp Mon Oct 26 18:27:33 2015 +0100
@@ -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();
}