[PATCH v1 5/7] Write SEH records to pdata/xdata

Jan Beulich jbeulich@suse.com
Thu Apr 10 11:27:42 GMT 2025


On 10.04.2025 13:13, Evgeny Karpov wrote:
> Wednesday, April 9, 2025
> Jan Beulich <jbeulich@suse.com> wrote:
> 
>> Also, why XDELETE() when it was free() before?
> 
> The recent change fixed memory leaks by using
> free(seh_ctx_cur);  
> however seh_ctx_cur is allocated by XCNEW, which is connected with XDELETE  
> to release memory. XDELETE uses the same free, however potentially,  
> the implementation might be changed.

That sounds like it wants to be a separate change then. Or at least such an
unrelated adjustment wants highlighting / justifying in the description.

>> Why plain int when both bounds are of an unsigned type (where in turn it's
>> questionable whether they really need to be uint32_t, rather than unsigned
>> int)?
> 
> Both variables are expected to be non-negative.
> The variable in the loop will be changed to uint32_t.

As indicated - please prefer unsigned int over uint32_t.

Jan


More information about the Binutils mailing list