[foreign-abi] RFR: 8251047: GC stackwalking doesn't work when intrinsics are enabled
Jorn Vernee
jvernee at openjdk.java.net
Wed Aug 5 10:59:05 UTC 2020
Hi,
This patch fixes GC stack walking for optimized native calls.
For calls in compiled frames, the callee argument oops are processed using special case code in
`CompiledMethod::preserve_callee_argument_oops`. This code relies on the original bytecode to find the signature of the
callee, but for optimized native calls this doesn't make sense, since the original call is replaced, and some of the
arguments (notably some that are oops) are discarded. In the case of an optimized native call, we can skip all callee
argument oop processing, since we can't pass any oops to native calls any ways.
Since the current code was already looking at debug info to find the signature of the callee, I piggy-backed on that to
add a flag for optimized native calls. If the flag is set, we return early, skipping any processing.
(I left in the assert I used to debug this, since it gives the failure a better error message, should we run into this
again in the future)
Thanks,
Jorn
-------------
Commit messages:
- Skip optimized native calls when processing callee argument oops.
- Add an assert to check whether a RegisterMap entry is NULL or not
Changes: https://git.openjdk.java.net/panama-foreign/pull/279/files
Webrev: https://webrevs.openjdk.java.net/panama-foreign/279/webrev.00
Issue: https://bugs.openjdk.java.net/browse/JDK-8251047
Stats: 33 lines in 9 files changed: 26 ins; 0 del; 7 mod
Patch: https://git.openjdk.java.net/panama-foreign/pull/279.diff
Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/279/head:pull/279
PR: https://git.openjdk.java.net/panama-foreign/pull/279
More information about the panama-dev
mailing list