RFR (S) JDK-8202758: SIGSEGV calling Class.forName(String,Boolean,ClassLoader) with mocked loader
Alan Bateman
Alan.Bateman at oracle.com
Fri May 25 08:05:58 UTC 2018
On 24/05/2018 18:35, Lois Foltan wrote:
> Please review this change to ensure that a given ClassLoader's unnamed
> Module is a valid instance of java.lang.Module with the JVM.
>
> open webrev at http://cr.openjdk.java.net/~lfoltan/bug_jdk8202758/webrev/
> bug link at https://bugs.openjdk.java.net/browse/JDK-8202758
The guarantee is unfortunate but there doesn't seem to be a better
option. Hopefully the maintainers of the mocking frameworks will take
notice as it is reckless to instantiate core classes like this. One
suggestion for the message is to suggest that the unnamed module "is
null or not an instance of Module". The mention of null might help
developers to get the bug reports to the right place and not assume a
JDK bug.
-Alan
More information about the hotspot-runtime-dev
mailing list