RFR: 8252148: vmError::controlled_crash should be #ifdef ASSERT

Ioi Lam iklam at openjdk.java.net
Thu Dec 10 22:48:00 UTC 2020


On Wed, 9 Dec 2020 21:47:31 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

> Moved some unit tests from vmError into a gtest and moved controlled_crash code under #ifdef ASSERT rather than #ifndef PRODUCT since the tests that use this are @requires = vm.debug.  This change keeps the ErrorHandlerTest=n option and other handler test options, because there are some tests that use this more but moves them to develop options (they were notproduct).  There are some ErrorHandlerTest=n tests that do more thorough hs_err_pid.log file verification that remain.
> 
> Tested with tier1-3 with product and fastdebug builds.  Built with optimized.
> 
> This is for JDK 17.

Marked as reviewed by iklam (Reviewer).

src/hotspot/share/utilities/vmError.cpp line 1818:

> 1816:       fatal("Crashing with number %d", how);
> 1817:   }
> 1818:   tty->print_cr("VMError::controlled_crash: survived intentional crash. Did you suppress the assert?");

The message should be changed: `VMError::controlled_crash` -> `controlled_crash`

-------------

PR: https://git.openjdk.java.net/jdk/pull/1723


More information about the hotspot-dev mailing list