--- a/hotspot/src/share/vm/runtime/java.cpp Tue Sep 17 20:20:03 2013 +0200
+++ b/hotspot/src/share/vm/runtime/java.cpp Wed Sep 18 07:02:10 2013 -0700
@@ -544,6 +544,19 @@
// it will run into trouble when system destroys static variables.
MemTracker::shutdown(MemTracker::NMT_normal);
+ if (VerifyStringTableAtExit) {
+ int fail_cnt = 0;
+ {
+ MutexLocker ml(StringTable_lock);
+ fail_cnt = StringTable::verify_and_compare_entries();
+ }
+
+ if (fail_cnt != 0) {
+ tty->print_cr("ERROR: fail_cnt=%d", fail_cnt);
+ guarantee(fail_cnt == 0, "unexpected StringTable verification failures");
+ }
+ }
+
#undef BEFORE_EXIT_NOT_RUN
#undef BEFORE_EXIT_RUNNING
#undef BEFORE_EXIT_DONE