This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 3/6] Reinstantiate fd range check if and only if defined _STRICT_FD_SIZE_CHECK=1
- From: KOSAKI Motohiro <kosaki dot motohiro at gmail dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Tue, 2 Apr 2013 15:23:39 -0400
- Subject: Re: [PATCH 3/6] Reinstantiate fd range check if and only if defined _STRICT_FD_SIZE_CHECK=1
- References: <1364570244-2088-1-git-send-email-kosaki dot motohiro at gmail dot com> <1364570244-2088-4-git-send-email-kosaki dot motohiro at gmail dot com> <515A9C80 dot 7020604 at redhat dot com>
On Tue, Apr 2, 2013 at 4:53 AM, Florian Weimer <fweimer@redhat.com> wrote:
> On 03/29/2013 04:17 PM, kosaki.motohiro@gmail.com wrote:
>>
>> /* Define some inlines helping to catch common problems. */
>> -#if __USE_FORTIFY_LEVEL > 0 && defined __GNUC__
>> +#if __USE_FORTIFY_LEVEL > 0 && defined __GNUC__ && _STRICT_FD_SIZE_CHECK
>> > 0
>> # include <bits/select2.h>
>> #endif
>
>
> I think this is backwards. The default with _FORTIFY_SOURCE should be to
> check, but having a way to disable the checks if needed might be helpful in
> some cases. (Porting to poll/epoll/glib event loop is almost always
> preferable, though.)
That breaks several applications and we can't take that.