RFR: 8271140: Fix native frame handling in vframeStream::asJavaVFrame()
Andreas Woess
aw at openjdk.java.net
Fri Jul 23 02:47:14 UTC 2021
Follow-up to https://github.com/openjdk/jdk/pull/4625 ([JDK-8269592](https://bugs.openjdk.java.net/browse/JDK-8269592)) which added support for native frames to `vframeStreamCommon::asJavaVFrame()`. This change was not correct when `asJavaVFrame()` is called for a native frame that is the last frame on the stack (i.e. the first frame in the stream), in which case there's no `_prev_frame` yet. We don't actually need the extended frame information for native frames, so the fix is to just use the vframeStream's `_frame` and `_reg_map` for native frames.
Extended the test from JDK-8269592 to cover this case.
-------------
Commit messages:
- 8271140: Fix native frame handling in vframeStream::asJavaVFrame()
Changes: https://git.openjdk.java.net/jdk/pull/4872/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4872&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8271140
Stats: 71 lines in 2 files changed: 34 ins; 22 del; 15 mod
Patch: https://git.openjdk.java.net/jdk/pull/4872.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/4872/head:pull/4872
PR: https://git.openjdk.java.net/jdk/pull/4872
More information about the hotspot-dev
mailing list