< prev index next >
src/hotspot/share/utilities/vmError.cpp
Print this page
rev 47819 : imported patch 10.07.open.rebase_20171110.dcubed
@@ -34,10 +34,11 @@
#include "runtime/atomic.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/init.hpp"
#include "runtime/os.hpp"
#include "runtime/thread.inline.hpp"
+#include "runtime/threadSMR.hpp"
#include "runtime/vmThread.hpp"
#include "runtime/vm_operations.hpp"
#include "runtime/vm_version.hpp"
#include "services/memTracker.hpp"
#include "trace/traceMacros.hpp"
@@ -1653,11 +1654,16 @@
const char* const eol = os::line_separator();
const char* const msg = "this message should be truncated during formatting";
char * const dataPtr = NULL; // bad data pointer
const void (*funcPtr)(void) = (const void(*)()) 0xF; // bad function pointer
- // Keep this in sync with test/runtime/ErrorHandling/ErrorHandler.java
+ // Keep this in sync with test/hotspot/jtreg/runtime/ErrorHandling/ErrorHandler.java
+ // which tests cases 1 thru 13.
+ // Case 14 is tested by test/hotspot/jtreg/runtime/ErrorHandling/SafeFetchInErrorHandlingTest.java.
+ // Case 15 is tested by test/hotspot/jtreg/runtime/ErrorHandling/SecondaryErrorTest.java.
+ // Case 16 is tested by test/hotspot/jtreg/runtime/ErrorHandling/ThreadsListHandleInErrorHandlingTest.java.
+ // Case 17 is tested by test/hotspot/jtreg/runtime/ErrorHandling/NestedThreadsListHandleInErrorHandlingTest.java.
switch (how) {
case 1: vmassert(str == NULL, "expected null");
case 2: vmassert(num == 1023 && *str == 'X',
"num=" SIZE_FORMAT " str=\"%s\"", num, str);
case 3: guarantee(str == NULL, "expected null");
@@ -1681,10 +1687,21 @@
// There's no guarantee the bad function pointer will crash us
// so "break" out to the ShouldNotReachHere().
case 13: (*funcPtr)(); break;
case 14: crash_with_segfault(); break;
case 15: crash_with_sigfpe(); break;
+ case 16: {
+ ThreadsListHandle tlh;
+ fatal("Force crash with an active ThreadsListHandle.");
+ }
+ case 17: {
+ ThreadsListHandle tlh;
+ {
+ ThreadsListHandle tlh2;
+ fatal("Force crash with a nested ThreadsListHandle.");
+ }
+ }
default: tty->print_cr("ERROR: %d: unexpected test_num value.", how);
}
ShouldNotReachHere();
}
< prev index next >