RFR: 8342607: Enhance register printing on x86_64 platforms [v7]
Martin Doerr
mdoerr at openjdk.org
Mon Oct 28 17:02:39 UTC 2024
On Mon, 28 Oct 2024 14:19:29 GMT, Richard Reingruber <rrich at openjdk.org> wrote:
>> Martin Doerr has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add check for uc->uc_mcontext.fpregs >= uc.
>
> src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp line 552:
>
>> 550: size_t fpregs_offset = ((address)uc->uc_mcontext.fpregs >= (address)uc) ?
>> 551: pointer_delta(uc->uc_mcontext.fpregs, uc, 1) : 0;
>> 552: if (fpregs_offset >= sizeof(ucontext_t) || fpregs_offset == 0) {
>
> Why protect against the assertion in `pointer_delta` here and not also in `store_context`?
> You could do the following in both methods:
> Suggestion:
>
> size_t fpregs_offset = ((address)uc->uc_mcontext.fpregs >= (address)uc) ?
> pointer_delta(uc->uc_mcontext.fpregs, uc, 1) : sizeof(ucontext_t);
> if (fpregs_offset >= sizeof(ucontext_t)) {
I've changed it such that we don't touch in this case.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21615#discussion_r1819426998
More information about the hotspot-runtime-dev
mailing list