RFR: 8343756: CAN_SHOW_REGISTERS_ON_ASSERT for Windows [v4]
Johan Sjölen
jsjolen at openjdk.org
Mon Nov 25 14:27:17 UTC 2024
On Thu, 14 Nov 2024 13:53:19 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:
>> Greetings,
>>
>> This enhancement adds register printouts on asserts or guarantees into the hs_err_pid.log error reporting files for Windows.
>>
>> Additionally, it saves an accurate EXCEPTION_RECORD into the hs_err_pid.mdmp file, also for asserts or guarantees, so the assertion context is now easily accessible in Windbg using .ecxr.
>>
>> For more details on this enhancement, please see the JIRA issue.
>>
>> Testing: Tier 1,2,3, jdk_jfr
>>
>> Thanks
>> Markus
>
> Markus Grönlund has updated the pull request incrementally with one additional commit since the last revision:
>
> extended test
Hi,
This code looks good to me, with a small comment.
src/hotspot/os/posix/os_posix.cpp line 2219:
> 2217: // In the copied version, fpregs should point to the copied contents.
> 2218: // Sanity check: fpregs should point into the context.
> 2219: if ((address)((const ucontext_t*)ucVoid)->uc_mcontext.fpregs > (address)ucVoid) {
Maybe check that the address is larger than ucVoid but smaller than `ucVoid + sizeof(ucontext_t)`?
```c++
const ucontext_t* uc = (const ucontext_t*)ucVoid;
if (uc->uc_mcontext.fpregs >= (uintptr_t)uc &&
uc->uc_mcontext.fpregs < (uintptr_t)(uc + 1)) {
}
-------------
Marked as reviewed by jsjolen (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/21994#pullrequestreview-2458582801
PR Review Comment: https://git.openjdk.org/jdk/pull/21994#discussion_r1856703906
More information about the hotspot-dev
mailing list