On Wed, 11 Nov 2026 08:15:59 GMT, Koichi Sakata <[email protected]> wrote:

> This PR prevents the `clhsdb pstack` command from throwing a 
> `DebuggerException` when obtaining the top frame. The exception occurs when 
> the PC is within a native library that has no `.eh_frame` section.
> 
> I added a test, `ClhsdbPstackNoEhFrame.java`, that uses a native library 
> without an `.eh_frame` section. The test fails with a `DebuggerException` 
> without the fix in `LinuxAARCH64CFrame.java`.
> 
> `getFrameFromReg()` returns the current frame without DWARF information if 
> DWARF parsing fails and the PC is within a known native library. Unwinding 
> stops at this frame, but analysis continues for other threads. This behavior 
> is consistent with the existing `sender()` method.
> 
> #### Testing
> I've run the following tests on Linux AArch64.
> 
> $ make run-test 
> TEST="jtreg:hotspot/jtreg/serviceability/sa/ClhsdbPstackNoEhFrame.java"
>    TEST                                              TOTAL  PASS  FAIL ERROR  
> SKIP
>    jtreg:test/hotspot/jtreg/serviceability/sa/ClhsdbPstackNoEhFrame.java
>                                                          1     1     0     0  
>    0
> $ make run-test TEST="jtreg:hotspot/jtreg/serviceability/sa/"
>    TEST                                              TOTAL  PASS  FAIL ERROR  
> SKIP
>    jtreg:test/hotspot/jtreg/serviceability/sa           81    76     0     0  
>    5
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

DebuggerException occurs in [`new 
AARCH64DwarfParser(libptr)`](https://github.com/jyukutyo/jdk/blob/0af9bbc05f5909de16053a3ee65e0b0ba829d2bf/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/DwarfCFrame.java#L59)
 in DwarfCFrame. The DebuggerException occurs before calling 
`DwarfParser‎#processDwarf‎‎()`. So the fallback to `.debug_frame` doesn't 
occur in this case.

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

PR Comment: https://git.openjdk.org/jdk/pull/33839#issuecomment-6812031998

Reply via email to