[PATCH v8] libctf: Sanitize error types for PR 30836
Torbjorn SVENSSON
torbjorn.svensson@foss.st.com
Tue Oct 17 15:35:50 GMT 2023
On 2023-10-17 17:15, Nick Alcock wrote:
> On 16 Oct 2023, Torbjörn SVENSSON told this:
>
>> Made sure there is no implicit conversion between signed and unsigned
>> return value for functions setting the ctf_errno value.
>> An example of the problem is that in ctf_member_next, the "offset" value
>> is either 0L or (ctf_id_t)-1L, but it should have been 0L or -1L.
>> The issue was discovered while building a 64 bit ld binary to be
>> executed on the Windows platform.
>> Example object file that demonstrates the issue is attached in the PR.
>>
>> libctf/
>> Affected functions adjusted.
>>
>> Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
>> Co-Authored-By: Yvan ROUX <yvan.roux@foss.st.com>
>
> Looks good to me! I'll push my test for this after your fix goes in.
>
Thanks Nick for your review and test effort.
Pushed.
More information about the Binutils
mailing list