ClassLoader.loadLibrary NullPointerException Regression in 8u242

Aleksey Shipilev shade at redhat.com
Wed Mar 4 10:16:04 UTC 2020


On 3/4/20 10:23 AM, Laurent Goubet wrote:
> Sorry, this is supposed to be an answer to the following thread but I 
> don't know if it is possible for me to answer a thread that existed 
> before I joined the mailing list : 
> https://mail.openjdk.java.net/pipermail/jdk8u-dev/2020-January/011057.html

Yes, so it is about:
  https://mail.openjdk.java.net/pipermail/jdk8u-dev/2020-February/011256.html
  https://bugs.openjdk.java.net/browse/JDK-8231584

> This is an implementation detail, but it seems to be used by quite a few 
> people to force the JDK to reset its library path, so it would be nice 
> for OpenJDK to support that as well instead of failing in NPE.

Yes. There is a distinction between what is legal and what is right.

It is *legal* for OpenJDK to reshuffle its implementation details and fail with NPE when something
pokes into it. When anyone pokes into JDK internals with Reflection they enter the awkward grey zone
where Bad Things (tm) can happen. This is one of those bad things.

It is, however, debatable if backporting 8231584 to 8u and 11u was the *right* thing to do. I reckon
that the damage it causes in the ecosystem that relies on LTS releases is far greater than the
elimination of the deadlock it tries to resolve.

Therefore, I suggest we revert 8231584 in its entirety from 8u (and 11u?). We can do this reversal
for April releases, if we act soon.

-- 
Thanks,
-Aleksey



More information about the jdk8u-dev mailing list