On Mon, 21 Feb 2022 14:43:27 GMT, Johannes Bechberger <d...@openjdk.java.net> wrote:
> Fixes the mentioned bug by replacing the check in AsyncGetCallTrace using the > newly introduced method `JavaThread::thread_from_jni_environment`. To be frank, I would like to integrate your changes into my, because I need a second PR for JDK to be able to write such issues in JBS on my own. To the PR itself: The main difference between both is that with my PR we say "this should not happen please check before if you really want this" and with your PR we don't. I liked your initial PR that threw an error for the normal case that we cannot call this method for a thread in an inconsistent state. As you stated in the comment in the method of your PR, it is only a special case for AsyncGetCallTrace. What is the down side of having to explicitly check for this special case when you need it and otherwise throw an error? ------------- PR: https://git.openjdk.java.net/jdk/pull/7559