This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Avoid undefined behavior in __FD_MASK


On 04/10/2013 09:45 AM, Florian Weimer wrote:
Shifting 1 into the sign position is supported by current GCC versions,
but the manual explicitly says this is subject to change.  __fd_mask
should really be an unsigned type, but changing that is more risky.  The
remaining bit operations should be safe.

I'd like to revive this patch:

<https://www.sourceware.org/ml/libc-alpha/2013-04/msg00295.html>

Changing the type of __fd_mask requires updates to the ABI testsuites. __fd_mask was added to them for a reason, I suppose, so I think adding the cast is the right way to address this.

--
Florian Weimer / Red Hat Product Security Team


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]