JDK-8203005 : The top-of-stack type specified for nofast_* bytecodes are wrong
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 11
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-05-11
  • Updated: 2024-11-13
  • Resolved: 2020-06-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 16
16 b04Fixed
Related Reports
Relates :  
Description
In bytecodes.cpp, we have:

  // Note 2: The result type is T_ILLEGAL for bytecodes where the top of stack
  //         type after execution is not only determined by the bytecode itself.

  //  Java bytecodes
  //  bytecode               bytecode name           format   wide f.   result tp  stk traps
  def(_fast_aload_0        , "fast_aload_0"        , "b"    , NULL    , T_OBJECT ,  1, true , _aload_0        );
  def(_fast_iload          , "fast_iload"          , "bi"   , NULL    , T_INT    ,  1, false, _iload);

but the following is wrong:

  def(_nofast_aload_0      , "nofast_aload_0"      , "b"    , NULL    , T_ILLEGAL,  1, true , _aload_0        );
  def(_nofast_iload        , "nofast_iload"        , "bi"   , NULL    , T_ILLEGAL,  1, false, _iload          );

The correct type specifiers should be 

_nofast_aload_0 -> T_OBJECT
_nofast_iload  -> T_INT

BTW, the Java code in SA's Bytecodes.java should also be fixed at the same time.
Comments
Changeset: 4682835f Author: Yumin Qi <minqi@openjdk.org> Date: 2020-06-25 12:40:02 +0000 URL: https://git.openjdk.java.net/amber/commit/4682835f
02-07-2020

Changeset: 4682835f Author: Yumin Qi <minqi@openjdk.org> Date: 2020-06-25 12:40:02 +0000 URL: https://git.openjdk.java.net/mobile/commit/4682835f
02-07-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/f2b42b50b505 User: minqi Date: 2020-06-25 19:40:27 +0000
25-06-2020