RFR: 8320515: assert(monitor->object_peek() != nullptr) failed: Owned monitors should not have a dead object [v5]
David Holmes
dholmes at openjdk.org
Tue Nov 28 05:42:13 UTC 2023
On Mon, 27 Nov 2023 09:27:40 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> test/hotspot/jtreg/runtime/Monitor/libMonitorWithDeadObjectTest.c line 47:
>>
>>> 45:
>>> 46: #define check(env, what, msg) \
>>> 47: check_exception((env), (msg)); \
>>
>> I'm not understanding why you have `check` and `check_exception` here nor why you choose to use one versus the other. ??
>
> Some JNI calls return something, for those I can use `check` which combines a null-check and an exception check. Some tests don't return anything, they can't null-check and can only perform an exception check.
Okay I had missed how the return values were being passed as `what`. It is annoying that we have to keep redefining this little helpers for error checking in these kinds of tests as we end up with similar but different ways of doing it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16783#discussion_r1407202355
More information about the hotspot-dev
mailing list