mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8065895: Synchronous signals during error reporting may terminate or hang VM process
Reviewed-by: dholmes, gziemski
This commit is contained in:
parent
5b89870233
commit
3bd56fc1a6
8 changed files with 196 additions and 57 deletions
|
@ -353,6 +353,26 @@ void VMError::report(outputStream* st) {
|
|||
"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 (_verbose && TestCrashInErrorHandler != 0) {
|
||||
st->print_cr("Will crash now (TestCrashInErrorHandler=%d)...",
|
||||
TestCrashInErrorHandler);
|
||||
controlled_crash(TestCrashInErrorHandler);
|
||||
}
|
||||
|
||||
STEP(14, "(test secondary crash 2)")
|
||||
if (_verbose && TestCrashInErrorHandler != 0) {
|
||||
st->print_cr("Will crash now (TestCrashInErrorHandler=%d)...",
|
||||
TestCrashInErrorHandler);
|
||||
controlled_crash(TestCrashInErrorHandler);
|
||||
}
|
||||
#endif // PRODUCT
|
||||
|
||||
STEP(15, "(printing type of error)")
|
||||
|
||||
switch(_id) {
|
||||
|
@ -786,6 +806,15 @@ void VMError::report(outputStream* st) {
|
|||
st->cr();
|
||||
}
|
||||
|
||||
#ifndef 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue