RFR: 8264940: java/lang/invoke/6998541/Test6998541.java failed "guarantee(ik->is_initialized()) failed: java/lang/Byte$ByteCache must be initialized"

Vladimir Kozlov kvn at openjdk.java.net
Fri Apr 9 19:57:19 UTC 2021


On Fri, 9 Apr 2021 11:58:02 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Changes requested by coleenp (Reviewer).
>
> To evaluate what is the right fix for this problem I need to understand how  JDK-8261137 caused the problem. Can you explain that please? When was this class normally initialized?
> 
> Simply initializing the class at the point where you thought it already should have been initialized may not be the right solution, and as Coleen has pointed out you have to deal with any exceptions that may occur during that initialization.
> 
> Thanks,
> David

The issue happens because the test was run with `-Xcomp` flag. The method was not executed in Interpreter and class was not initialized before the method is JIT compiled.
I agree with @dholmes-ora that we should not fix it in Deoptimizer. I think we should restrict "Optimization of Box nodes in uncommon_trap" [8261137 ](https://bugs.openjdk.java.net/browse/JDK-8261137) only to cases when  class is initialized.

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

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


More information about the hotspot-dev mailing list