RFR: 8371368: SIGSEGV in JfrVframeStream::next_vframe() on arm64 [v2]
Markus Grönlund
mgronlun at openjdk.org
Wed Nov 19 14:02:39 UTC 2025
On Wed, 19 Nov 2025 11:16:51 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Markus Grönlund has updated the pull request incrementally with one additional commit since the last revision:
>>
>> ppc and s390 do not have frame::sender_sp_offset defined
>
> src/hotspot/share/jfr/periodic/sampling/jfrThreadSampling.cpp line 220:
>
>> 218: if (is_valid(pc_desc)) {
>> 219: intptr_t* const synthetic_sp = sender_sp - sampled_nm->frame_size();
>> 220: top_frame = frame(synthetic_sp, synthetic_sp, sender_sp - 2, pc_desc->real_pc(sampled_nm), sampled_nm);
>
> Hold on. I am looking at relevant constructor:
>
>
> inline frame::frame(intptr_t* sp)
> : frame(sp, sp,
> *(intptr_t**)(sp - frame::sender_sp_offset),
> pauth_strip_verifiable(*(address*)(sp - 1))) {}
>
>
> ...and:
>
>
> inline intptr_t* frame::fp(const intptr_t* sp) {
> assert(sp != nullptr, "invariant");
> return reinterpret_cast<intptr_t*>(sp[-2]);
> }
>
>
> So `sender_sp - 2` (which I think is `sp - frame::sender_sp_offset`?) is the _location_ for the FP, not the FP itself?
sender_sp - 2 is the calculated synthetic fp, just like synthetic sp is the calculated sp (from sender sp - cb->frame_size()) for the frame that we are reconstructing.
We are stackwalking backwards, if that helps with the conceptual model.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28373#discussion_r2542128620
More information about the hotspot-jfr-dev
mailing list