Integrated: 8280422: thread_from_jni_environment can never return NULL

David Holmes dholmes at openjdk.java.net
Tue Jan 25 01:26:36 UTC 2022


On Sun, 23 Jan 2022 23:20:38 GMT, David Holmes <dholmes at openjdk.org> wrote:

> Analysing the code and its use (see JBS issue for gory details) we can see that `thread_from_jni_environment` can never actually return NULL, so we change it to not appear to do so and thus keep static analysis tools happy.  We also always validate the incoming JNIEnv for debug builds and scrap the unused `VerifyJNIEnvThread` flag.
> 
> Testing: tiers 1-5
> 
> Thanks,
> David

This pull request has now been integrated.

Changeset: f35df5bf
Author:    David Holmes <dholmes at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/f35df5bfb5d23f439fb64e8511fd5ca34c773f30
Stats:     25 lines in 3 files changed: 10 ins; 4 del; 11 mod

8280422: thread_from_jni_environment can never return NULL

Reviewed-by: shade, kbarrett

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

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


More information about the hotspot-runtime-dev mailing list