[PATCH, V3 5/6] libsframe: stop search for SFrame FRE if its start IP is greater than PC
Jan Beulich
jbeulich@suse.com
Fri Jun 6 10:11:39 GMT 2025
On 06.06.2025 12:03, Jens Remus wrote:
> On 06.06.2025 11:29, Jan Beulich wrote:
>> On 26.05.2025 07:08, Indu Bhagat wrote:
>>> --- a/libsframe/sframe.c
>>> +++ b/libsframe/sframe.c
>>> @@ -1096,14 +1096,13 @@ sframe_find_fre (sframe_decoder_ctx *ctx, int32_t pc,
>>> {
>>> sframe_frame_row_entry cur_fre;
>>> sframe_func_desc_entry *fdep;
>>> - uint32_t fre_type, fde_type, i;
>>> + uint32_t fre_type, i;
>>> int32_t start_ip_offset;
>>> int32_t func_start_addr;
>>> int32_t end_ip_offset;
>>> const char *fres;
>>> size_t size = 0;
>>> int err = 0;
>>> - bool mask_p;
>>>
>>> if ((ctx == NULL) || (frep == NULL))
>>> return sframe_set_errno (&err, SFRAME_ERR_INVAL);
>>> @@ -1114,8 +1113,6 @@ sframe_find_fre (sframe_decoder_ctx *ctx, int32_t pc,
>>> return sframe_set_errno (&err, SFRAME_ERR_DCTX_INVAL);
>>>
>>> fre_type = sframe_get_fre_type (fdep);
>>> - fde_type = sframe_get_fde_type (fdep);
>>> - mask_p = (fde_type == SFRAME_FDE_TYPE_PCMASK);
>>
>> The removal of these two local vars looks unrelated. I won't insist on this
>> being moved to a separate patch, but the change then wants mentioning in the
>> description (to at least make clear it's deliberate, not a mistake).
>
> The removal is related, as below (re-cited) change removes the only user
> of mask_p, making it necessary to remove it. This in turn removes the
> only user of fde_type, making it necessary to remove that as well.
Oh, I see, I overlooked that. I had looked for only fde_type uses, and
there were none that were removed from the code below.
> Given Indu has already committed the patch to mainline (presumably as
> libsframe maintainer) I can no longer amend the description. Sorry!
Yeah, I only later noticed these went in already. Given my oversight this
is fine as is anyway.
Jan
More information about the Binutils
mailing list