Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8216242 | 13 | Jini George | P3 | Resolved | Fixed | team |
Description
mail snippet from David Griffiths below
=======================================================
I have observed that if the top frame is in the interpreter it reports the BCI and line number incorrectly. This is because X86Frame.getInterpreterFrameBCI uses the value stored on the stack rather than the actual live value stored in R13.
I have a patch for this which lets LinuxAMD64JavaThreadPDAccess.getCurrentFrameGuess pass the R13 value to X86Frame so that the latter can then do:
public int getInterpreterFrameBCI() {
Address bcp = addressOfInterpreterFrameBCX().getAddressAt(0);
// If we are in the top level frame then R13 may have been set for us which contains
// the BCP. If so then let it take priority. If we are in a top level interpreter frame,
// the BCP is live in R13 (on x86) and not saved in the BCX stack slot.
if (r13 != null) {
bcp = r13;
}
Address methodHandle = addressOfInterpreterFrameMethod().getAddressAt(0);
and this fixes the problem.
==============================================
=======================================================
I have observed that if the top frame is in the interpreter it reports the BCI and line number incorrectly. This is because X86Frame.getInterpreterFrameBCI uses the value stored on the stack rather than the actual live value stored in R13.
I have a patch for this which lets LinuxAMD64JavaThreadPDAccess.getCurrentFrameGuess pass the R13 value to X86Frame so that the latter can then do:
public int getInterpreterFrameBCI() {
Address bcp = addressOfInterpreterFrameBCX().getAddressAt(0);
// If we are in the top level frame then R13 may have been set for us which contains
// the BCP. If so then let it take priority. If we are in a top level interpreter frame,
// the BCP is live in R13 (on x86) and not saved in the BCX stack slot.
if (r13 != null) {
bcp = r13;
}
Address methodHandle = addressOfInterpreterFrameMethod().getAddressAt(0);
and this fixes the problem.
==============================================
Attachments
Issue Links
- backported by
-
JDK-8216242 SA: Incorrect BCI and Line Number with jstack if the top frame is in the interpreter
-
- Resolved
-
- relates to
-
JDK-8231634 SA stack walking fails with "illegal bci"
-
- Resolved
-
-
JDK-8243500 SA: Incorrect BCI and Line Number with jstack if the top frame is in the interpreter (BSD and Windows)
-
- Resolved
-
-
JDK-8222499 serviceability/sa/JhsdbThreadInfoTest.java fails with "AssertionFailure: illegal bci"
-
- Closed
-