< prev index next >

src/share/vm/utilities/vmError.cpp

Print this page
rev 7417 : improve secondary signal handling

@@ -350,10 +350,26 @@
     } else {
       st->print_cr("# There is insufficient memory for the Java "
                    "Runtime Environment to continue.");
     }
 
+#ifndef PRODUCT
+  // Error handler self tests
+
+  // test secondary error handling. Test it twice, to test that resetting 
+  // error handler after a secondary crash works.
+  STEP(13, "(test secondary crash 1)")
+    if (TestCrashInErrorHandler != 0) {
+      controlled_crash(TestCrashInErrorHandler);
+    }
+
+  STEP(14, "(test secondary crash 2)")
+    if (TestCrashInErrorHandler != 0) {
+      controlled_crash(TestCrashInErrorHandler);
+    }
+#endif // PRODUCT
+
   STEP(15, "(printing type of error)")
 
      switch(_id) {
        case OOM_MALLOC_ERROR:
        case OOM_MMAP_ERROR:

@@ -783,10 +799,19 @@
      if (_verbose) {
        os::print_date_and_time(st);
        st->cr();
      }
 
+#ifdef PRODUCT
+  // print a defined marker to show that error handling finished correctly.
+  STEP(290, "(printing end marker)" )
+
+     if (_verbose) {
+       st->print_cr("END.");
+     }
+#endif
+
   END
 
 # undef BEGIN
 # undef STEP
 # undef END
< prev index next >