On Thu, 18 Jun 2026 23:37:34 GMT, Yasumasa Suenaga <[email protected]> wrote:
> DWARF parser on AArch64 has been supported since > [JDK-8377946](https://bugs.openjdk.org/browse/JDK-8377946) (PR #29731), but > warning message would be shown to notice call frames which are the result of > mixed jstack might be incorrect if PAC (Pointer Authentication Code) is > enabled. However it does not work. > > `pac_enabled` is declared as `bool` as a member of `ps_prochandle` in > libproc_impl.h. Accessor function is defined in libproc_impl.c. `bool` might > not be defined by default in C, so it is defined in libproc.c as following: > > > // This C bool type must be int for compatibility with Linux calls and > // it would be a mistake to equivalence it to C++ bool on many platforms > #ifndef __cplusplus > typedef int bool; > #define true 1 > #define false 0 > #endif > > > OTOH `pac_enabled()` would be called in LinuxDebuggerLocal.cpp. C++ has > `bool` by default as 1 byte data. `HWCAP_PACA` is defined as 0x40000000, thus > it would be `false` even if `HWCAP_PACA` is set because 1st byte of > `HWCAP_PACA` is zero. > > Hence we need to set the value as boolean to `pac_enabled` explicitly. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). This pull request has now been integrated. Changeset: a0c0ab80 Author: Yasumasa Suenaga <[email protected]> URL: https://git.openjdk.org/jdk/commit/a0c0ab80d3b0206494b3495b4e1b483a7b61636d Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod 8386944: Warning message was not printed on PAC enabled AArch64 Linux Reviewed-by: cjplummer, kevinw ------------- PR: https://git.openjdk.org/jdk/pull/31583
