RFR: 8374482: SA does not handle signal handler frame in mixed jstack [v5]
Yasumasa Suenaga
ysuenaga at openjdk.org
Fri Jan 23 11:46:46 UTC 2026
On Fri, 23 Jan 2026 09:23:02 GMT, Kevin Walls <kevinw at openjdk.org> wrote:
>> Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Refactoring
>
> Thanks for your efforts on this.
>
> Yes, the bytes were Linux x64 specific. I was thinking that the check would be in a file that is platform/arch specific, and would check for the specific signal return method for that architecture.
>
> If we do this with symbol names, or by looking at the bytes, it looks odd to have a generic method in the symtab file or LinuxCDebugger/LinuxDebuggerLocal that recognises a signal return method from any platform.
>
> If it's simpler to use symbol names that's fine, but I'm saying if we implement the recognition in LinuxADM64CFrame, then it knows what platform/arch this is, and can check for the specific symbol or bytes.
glibc has following comments in sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c. It is better to check both function name and instruction bytes. @kevinjwalls What do you think?
/* NOTE: Please think twice before making any changes to the bits of
code below. GDB needs some intimate knowledge about it to
recognize them as signal trampolines, and make backtraces through
signal handlers work right. Important are both the names
(__restore_rt) and the exact instruction sequence.
If you ever feel the need to make any changes, please notify the
appropriate GDB maintainer.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29023#issuecomment-3789868617
More information about the serviceability-dev
mailing list