Calling JavaThread::thread_from_jni_environment for a terminated thread in 
AsyncGetCallTrace might cause the acquisition of a lock, making 
AsyncGetCallTrace non-signal-safe. 

AsyncGetCallTrace can only be called for the current threads (there are asserts 
for that), therefore using JavaThread::current directly and checking the 
termination status is semantically equivalent.

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

Commit messages:
 - Use JavaThread::current_or_null
 - Do not call JavaThread::thread_from_jni_environment

Changes: https://git.openjdk.java.net/jdk/pull/8446/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8446&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8285794
  Stats: 4 lines in 1 file changed: 0 ins; 1 del; 3 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8446.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8446/head:pull/8446

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

Reply via email to