8348862: runtime/ErrorHandling/CreateCoredumpOnCrash fails on Windows aarch64#27074
8348862: runtime/ErrorHandling/CreateCoredumpOnCrash fails on Windows aarch64#27074swesonga wants to merge 8 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back swesonga! A progress list of the required criteria for merging this PR into |
|
@swesonga This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 53 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@dholmes-ora) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
Webrevs
|
dholmes-ora
left a comment
There was a problem hiding this comment.
Just a couple of comments on the shared Windows code - I can't review the actual changes here.
Thanks
| #elif defined(_M_ARM64) | ||
| if (handle_safefetch(exception_code, pc, (void*)exceptionInfo->ContextRecord)) { | ||
| return EXCEPTION_CONTINUE_EXECUTION; | ||
| } |
There was a problem hiding this comment.
Could you merge with the existing ARM64 section so we only have two distinct code chunks: one for X64 and one for aarch64. Thanks
Co-authored-by: David Holmes <62092539+dholmes-ora@users.noreply.github.com>
dholmes-ora
left a comment
There was a problem hiding this comment.
Suggestions for os_windows.cpp:
- Merge the AMD64 block at line 2658 with the one at 2651.
- Move line 2656
Thread* t = ...to line 2680 astseems not used until line 2681
Thanks
dholmes-ora
left a comment
There was a problem hiding this comment.
Nothing further from me. Ideally one of the other Windows-aarch64 port developers would also review this.
Thanks
mo-beck
left a comment
There was a problem hiding this comment.
LGTM - Thanks for fixing this @swesonga
Reviewed the Windows aarch64 exception handling implementation:
- FAILED() macro usage correct for vectored exception handling
- SafeFetch integration properly handles fault/continuation pattern
- Test update with 0xdeadbeef appropriately validates the filtering logic
- Clean platform-specific conditional compilation
Good fix for the crash handling issues.
|
/integrate |
|
/sponsor |
|
Going to push as commit f4209df.
Your commit was automatically rebased without conflicts. |
|
@dholmes-ora @swesonga Pushed as commit f4209df. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
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 exception codes that are success HRESULT values are also encountered in routine execution on Windows AArch64. One example of an error code for which error reporting should not be done is an exception with the DBG_PRINTEXCEPTION_C exception code, which is encountered in routine execution on Windows AArch64. Such exceptions are excluded from error reporting, similar to how EXCEPTION_BREAKPOINT is excluded. The codes for which error reporting will be performed are those for which the Windows FAILED macro returns true. See Error Codes in COM
for more information on COM error handling.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27074/head:pull/27074$ git checkout pull/27074Update a local copy of the PR:
$ git checkout pull/27074$ git pull https://git.openjdk.org/jdk.git pull/27074/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 27074View PR using the GUI difftool:
$ git pr show -t 27074Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27074.diff
Using Webrev
Link to Webrev Comment