RFR: 8252148: vmError::controlled_crash should be #ifdef ASSERT [v2]

Thomas Stuefe stuefe at openjdk.java.net
Fri Dec 11 17:34:00 UTC 2020


On Fri, 11 Dec 2020 15:23:00 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> src/hotspot/share/utilities/debug.cpp line 246:
>> 
>>> 244: #ifdef ASSERT
>>> 245:   if (ExecutingUnitTests) {
>>> 246:     if (detail_fmt != NULL) {
>> 
>> You miss va_copy for detail_args here.
>
> va_list detail_args_copy;
>       va_copy(detail_args_copy, detail_args);
>       jio_vsnprintf(_detail_msg, sizeof(_detail_msg), detail_fmt, detail_args_copy);
> 
> I fixed this but I didn't see the message garbled (?)
> 
> You're right in your comment that we are testing the assert message through print_error_for_unit_test.  I think the original motivation was to move the test that checked for a specific message out of the error handling tests, and these other ones just came for the ride.

Thats fine, I like this. Its a good simplification.

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

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


More information about the hotspot-dev mailing list