RFR JDK-8193325: StackFrameInfo::getByteCodeIndex returns wrong value if bci > 32767

Mandy Chung mandy.chung at oracle.com
Tue Aug 13 17:49:32 UTC 2019

On 8/13/19 9:30 AM, Peter Levart wrote:
> Usually the StackFrameInfo(s) are consumed as soon as they are 
> returned from StackWalker API and never assigned to @Stable field. So 
> there's no purpose of @Stable for bci field use. Except documentation. 
> But documentation can be specified in the form of comments too.

There are several JDK classes whose fields are filled by VM and comment 
is the form of documentation.  Until new use of StackFrame in the future 
shows performance benefit, it's okay to stick with @Stable original 
intent and keep the comment:

+    private int bci;                    // zero and negative values 
represent invalid BCI

Please also review CSR:


More information about the core-libs-dev mailing list