< prev index next >

src/share/vm/utilities/debug.hpp

Print this page
rev 7703 : 8065895 Synchronous signals during error reporting may terminate or hang VM process
Contributed-by: stuefe

@@ -246,10 +246,28 @@
 void set_error_reported();
 
 /* 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 - SIGILL 
+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);
 
 class outputStream;
 void print_native_stack(outputStream* st, frame fr, Thread* t, char* buf, int buf_size);
< prev index next >