hotspot/src/share/vm/utilities/debug.hpp
changeset 28943 679546f0cc1f
parent 28485 d2759d2238a2
child 29691 c539e3e94ef1
--- a/hotspot/src/share/vm/utilities/debug.hpp	Wed Feb 04 16:09:49 2015 +0100
+++ b/hotspot/src/share/vm/utilities/debug.hpp	Wed Feb 04 18:47:42 2015 -0500
@@ -248,6 +248,24 @@
 /* Test vmassert(), fatal(), guarantee(), etc. */
 NOT_PRODUCT(void test_error_handler();)
 
+// crash in a controlled way:
+// how can be one of:
+// 1,2 - asserts
+// 3,4 - guarantee
+// 5-7 - fatal
+// 8 - vm_exit_out_of_memory
+// 9 - ShouldNotCallThis
+// 10 - ShouldNotReachHere
+// 11 - Unimplemented
+// 12,13 - (not guaranteed) crashes
+// 14 - SIGSEGV
+// 15 - SIGFPE
+NOT_PRODUCT(void controlled_crash(int how);)
+
+// returns an address which is guaranteed to generate a SIGSEGV on read,
+// for test purposes, which is not NULL and contains bits in every word
+NOT_PRODUCT(void* get_segfault_address();)
+
 void pd_ps(frame f);
 void pd_obfuscate_location(char *buf, size_t buflen);