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

David Holmes david.holmes at oracle.com
Mon Aug 12 04:49:28 UTC 2019

On 11/08/2019 2:50 pm, Mandy Chung wrote:
> On 8/10/19 12:30 AM, Aleksey Shipilev wrote:
>> On 8/9/19 10:19 PM, Mandy Chung wrote:
>>> An earlier version of this patch was reviewed [1] but I
>>> didn't get back to explore the other approach.  I rebase
>>> the patch and take out the hotspot change which will be
>>> covered by JDK-8229375:
>>> http://cr.openjdk.java.net/~mchung/jdk14//8193325/webrev.01
>> I wonder if bci=-1 is meaningful, and should be returned when BCI is 
>> not available. After this patch, it would be converted to 65536?

This is my query as well. It is not obvious to me that the VM will never 
set a BCI of -1


> I'm including Coleen to confirm.
> If the stack frame is in a Java method, should BCI always be a valid 
> index to the Code attribute?
> If it's in a native method, StackFrameInfo::getByteCodeIndex returns -1 
> and bci field is ignored.
> Mandy

More information about the core-libs-dev mailing list