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

Mandy Chung mandy.chung at oracle.com
Mon Aug 12 18:12:53 UTC 2019

On 8/11/19 9:49 PM, David Holmes wrote:
> 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

Frederic adds an assert to ensure that bci is a valid value [1] in the 
fix for JDK-8229375.  This would help catching the odd case with invalid 

Alternatively, we can make bci an int (as Alekey suggests) that does not 
increase the object size:


This means that this will replace Frederic's proposed patch for JDK-8229375.

What do you think?


More information about the core-libs-dev mailing list