[PATCH v8] libctf: Sanitize error types for PR 30836
Nick Alcock
nick.alcock@oracle.com
Tue Oct 17 15:15:07 GMT 2023
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.
--
NULL && (void)
More information about the Binutils
mailing list