RFR: 8263567: gtests don't terminate the VM safely
David Holmes
dholmes at openjdk.java.net
Fri Aug 6 04:49:36 UTC 2021
On Fri, 6 Aug 2021 04:40:22 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> test/hotspot/gtest/unittest.hpp line 99:
>>
>>> 97: fprintf(stderr, "Warning: DestroyJavaVM error %d\n", ret); \
>>> 98: } \
>>> 99: } \
>>
>> For better readibility I'd factor this out to an own function.
>
> The problem is I don't have anywhere to put that function so that this macro can invoke it.
To be more clear this is a .hpp file included by many .cpp files. If I put the function in the .hpp file and a specific .cpp file does not use the TEST_OTHER_VM macro then we have a function defined but not used and so hit `-Werror=unused-function`.
Is there some .cpp file I can put this in that would be globally accessible to all the test .cpp files?
-------------
PR: https://git.openjdk.java.net/jdk/pull/4986
More information about the hotspot-runtime-dev
mailing list