RFR: 8343756: CAN_SHOW_REGISTERS_ON_ASSERT for Windows [v4]

Markus Grönlund mgronlun at openjdk.org
Mon Nov 25 14:44:15 UTC 2024


On Mon, 25 Nov 2024 14:23:23 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

>> Markus Grönlund has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   extended test
>
> 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)) {
>   }

This is existing code that someone else wrote. It's also Linux-specific. I have only moved the existing logic.

I prefer not to touch this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21994#discussion_r1856736596


More information about the hotspot-dev mailing list