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

Jaroslav Bachorik jbachorik at openjdk.org
Mon Mar 10 11:36:35 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.
> 
> 
> The change is not accompanied by a JTReg test because I was not able to craft one triggering the issue reliably.
> 
> Existing tests from tier1-tier4 were run on a linux-aarch64 system with no new failures observed.

Jaroslav Bachorik has updated the pull request incrementally with one additional commit since the last revision:

  Make proper fix: 'sp' -> 'unextended_sp' in the condition

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

Changes:
  - all: https://git.openjdk.org/jdk11u-dev/pull/3003/files
  - new: https://git.openjdk.org/jdk11u-dev/pull/3003/files/3a89bf64..4d040261

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk11u-dev&pr=3003&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk11u-dev&pr=3003&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk11u-dev/pull/3003.diff
  Fetch: git fetch https://git.openjdk.org/jdk11u-dev.git pull/3003/head:pull/3003

PR: https://git.openjdk.org/jdk11u-dev/pull/3003


More information about the jdk-updates-dev mailing list