On Fri, 31 Mar 2023 03:05:31 GMT, David Holmes <dhol...@openjdk.org> wrote:
>> Markus Grönlund has updated the pull request incrementally with one >> additional commit since the last revision: >> >> restore misssing frees > > src/hotspot/share/prims/agent.cpp line 533: > >> 531: if (thread->is_pending_jni_exception_check()) { >> 532: thread->clear_pending_jni_exception_check(); >> 533: } > > Unsure why we pretend the agent checked this - don't we want -Xcheck:jni to > report a bug in the agent? Good question - I don't know. For dynamically loaded agents, there seems to be quite a lot of handling to return a JNI_OK, even though the agent failed to load or returned failure from the Agent_OnAttach. e.g. // Agent_OnAttach executed so completion status is JNI_OK return JNI_OK; ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/12923#discussion_r1154346856