[foreign-memaccess+abi] RFR: 8268673: Stack walk across optimized entry frame on fresh native thread fails [v2]

Jorn Vernee jvernee at openjdk.java.net
Mon Jun 14 12:38:03 UTC 2021


> Hi,
> 
> When native code creates a new thread and calls a Panama upcall, and during that upcall a stack walk is triggered, getting the sender frame for the entry frame is not possible, and should not be attempted.
> 
> For JNI this case is handled already by indicating the end of the stack frame stream, but for Panama upcalls it is not, and the VM will either hit an assert or crash when trying to find the last Java frame before the entry frame (which does not exist in this case).
> 
> This patch adds handling for panama upcalls frames to `frame::is_first_frame`, which is used by the stack walking code to determine when to stop walking.
> 
> Thanks,
> Jorn

Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision:

  Missing from previous commit

-------------

Changes:
  - all: https://git.openjdk.java.net/panama-foreign/pull/558/files
  - new: https://git.openjdk.java.net/panama-foreign/pull/558/files/a34d088c..50fd53c2

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=558&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=558&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/558.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/558/head:pull/558

PR: https://git.openjdk.java.net/panama-foreign/pull/558


More information about the panama-dev mailing list