RFR: 8348862: runtime/ErrorHandling/CreateCoredumpOnCrash fails on Windows aarch64 [v4]
Saint Wesonga
duke at openjdk.org
Tue Oct 7 16:49:28 UTC 2025
> The Windows AArch64 OpenJDK build uses vectored exception handling. The implementation registers a custom vectored exception handler, which calls the exception filter function that is shared with the x64 platform. However, this call only happens when using -xcomp. This has the side effect of not running the JVM error handling code that would create a core dump if only the interpreter is used. This change fixes this issue by unconditionally using the same exception handler as Windows x64. The CreateCoredumpOnCrash test now passes with this change.
>
> Although vectored exception handling is used on Windows AArch64, the implementation currently uses the same safefetch implementation as x64, which relies on structured exception handling. This change fixes safefetch on Windows AArch64 to not use the SEH implemenation (in safefetch_windows.hpp). This change defines the static assembly language for the fetching code like the other aarch64 platforms have done and updates the exception handler to recognize exceptions from the safe fetch assembly instructions. This came up because the NMT gtests started failing after the change to the exception handler.
>
> Exceptions with the DBG_PRINTEXCEPTION_C exception code are also encountered in routine execution on Windows AArch64 so I excluded them from causing error reporting, similar to how EXCEPTION_BREAKPOINT is handled. I'm not sure if this handling needs to also be extended to exception codes with success codes in https://learn.microsoft.com/en-us/windows/win32/learnwin32/error-codes-in-com (based on the most significant bit of the 32-bit code)
Saint Wesonga has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last revision:
- Scope down error reporting to failed exception codes (other than EXCEPTION_UNCAUGHT_CXX_EXCEPTION) on Windows AArch64
- Merge defined(_M_AMD64) blocks
- Merge branch 'master' into 8348862-create-core-dumps-win-aarch64
- Move safefetch handling into existing _M_ARM64 block
- Clarify that SEH is only used on Windows x86_64
Co-authored-by: David Holmes <62092539+dholmes-ora at users.noreply.github.com>
- Fix bug causing missing core dumps on Windows AArch64
- Windows AArch64 safefetch implementation should not use structured exception handling
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/27074/files
- new: https://git.openjdk.org/jdk/pull/27074/files/9829641a..056c0676
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=27074&range=03
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=27074&range=02-03
Stats: 205262 lines in 2808 files changed: 155420 ins; 32028 del; 17814 mod
Patch: https://git.openjdk.org/jdk/pull/27074.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/27074/head:pull/27074
PR: https://git.openjdk.org/jdk/pull/27074
More information about the hotspot-runtime-dev
mailing list