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

Coleen Phillimore coleenp at openjdk.java.net
Fri Dec 11 15:03:57 UTC 2020


On Thu, 10 Dec 2020 17:58:41 GMT, Gerard Ziemski <gziemski 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.
>
> src/hotspot/share/utilities/debug.cpp line 250:
> 
>> 248:       // message to be printed in one short line to stderr (see TEST_VM_ASSERT_MSG) and
>> 249:       // cannot be tweaked to accept our normal assert message.
>> 250:       jio_vsnprintf(_detail_msg, sizeof(_detail_msg), detail_fmt, detail_args);
> 
> Does `'static char _detail_msg[1024];` need to be outside of `print_error_for_unit_test()`
> 
> Why not put it inside the `print_error_for_unit_test()` just before `jio_vsnprintf ` ?

Ok, I fixed that.

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

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


More information about the hotspot-dev mailing list