This is the exact same bug as JDK-8214226, which only addressed LinuxAMD64. The same fix should be applied to BSDAMD64 and WindowsAMD64:
if (guesser.getPC() == null) {
return new X86Frame(guesser.getSP(), guesser.getFP());
+ } else if (VM.getVM().getInterpreter().contains(guesser.getPC())) {
+ // pass the value of R13 which contains the bcp for the top level frame
+ Address bcp = context.getRegisterAsAddress(AMD64ThreadContext.R13);
+ return new X86Frame(guesser.getSP(), guesser.getFP(), guesser.getPC(), null, bcp);
} else {
return new X86Frame(guesser.getSP(), guesser.getFP(), guesser.getPC());
}
if (guesser.getPC() == null) {
return new X86Frame(guesser.getSP(), guesser.getFP());
+ } else if (VM.getVM().getInterpreter().contains(guesser.getPC())) {
+ // pass the value of R13 which contains the bcp for the top level frame
+ Address bcp = context.getRegisterAsAddress(AMD64ThreadContext.R13);
+ return new X86Frame(guesser.getSP(), guesser.getFP(), guesser.getPC(), null, bcp);
} else {
return new X86Frame(guesser.getSP(), guesser.getFP(), guesser.getPC());
}
- relates to
-
JDK-8214226 SA: Incorrect BCI and Line Number with jstack if the top frame is in the interpreter
- Resolved