RFR JDK-8193325: StackFrameInfo::getByteCodeIndex returns wrong value if bci > 32767
Aleksey Shipilev
shade at redhat.com
Mon Aug 12 19:06:08 UTC 2019
On 8/12/19 9:01 PM, Mandy Chung wrote:
> import jdk.internal.access.JavaLangInvokeAccess;
> import jdk.internal.access.SharedSecrets;
> +import jdk.internal.vm.annotation.Stable;
Not needed anymore.
> + private final int bci = -1; // BCI set by VM
AFAIU, this sets up the field to be "constant variable", which does run afoul the later VM
injection. See for example: https://shipilev.net/jvm/anatomy-quarks/14-constant-variables/
> StackFrameInfo(StackWalker walker) {
> this.flags = walker.retainClassRef ? RETAIN_CLASS_REF : 0;
> - this.bci = -1;
I'd keep initialization here instead of the field, see above why.
--
Thanks,
-Aleksey
More information about the core-libs-dev
mailing list