[jdk8u-dev] RFR: 8315380: AsyncGetCallTrace crash in frame::safe_for_sender

Jaroslav Bachorik jbachorik at openjdk.org
Thu Jul 24 19:45:36 UTC 2025


This change is fixing the problem in `frame_aarch64.cpp`, function `safe_for_sender`, where we have this code


bool unextended_sp_safe = unextended_sp < thread->stack_base();


While this captures one possibility of not being safe, it omits the check for `unextended_sp` falling within the stack space.

The proposed change then is


bool unextended_sp_safe = (unextended_sp < thread->stack_base() && \
                             sp >= thread->stack_base() - thread->stack_size());


This is actually just making sure the behaviour is the same as in JDK 15+ (since [JDK-8238988](https://bugs.openjdk.org/browse/JDK-8238988)) where the `unextended_sp` is checked for being within the stack limits.


This PR is a clean backport of https://github.com/openjdk/jdk11u-dev/pull/3003

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

Commit messages:
 - Backport d46f769e70f6c0e8effcb78310cacc391a14fd6f

Changes: https://git.openjdk.org/jdk8u-dev/pull/667/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=667&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8315380
  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk8u-dev/pull/667.diff
  Fetch: git fetch https://git.openjdk.org/jdk8u-dev.git pull/667/head:pull/667

PR: https://git.openjdk.org/jdk8u-dev/pull/667


More information about the jdk8u-dev mailing list