Re: Plese help with Fatal error

From: Dancer <dancer@dont-contact.us>
Date: Thu, 15 Jul 1999 11:00:07 +1000

Henrik Nordstrom wrote:
>
> Dirk Moerenhout wrote:
> >
> > To make sure everybody knows what I normally do:
> > - I compile linux + ac-patch
> > - I compile glibc 2.1.1 against the new kernel
> > - I change /usr/include/bits/types.h
>
> There is no point in rebuilding glibc unless you also tune it's view of
> __FD_SETSIZE. The reason you need to rebuild glibc is limitations of
> FD_SETSIZE, not the kernel. You may perfectly well build a glibc
> supporting a trillion of filedescriptors using a machine with a kernel
> only supporting a few (100 should be enought) as a build machine.
>
> FD_SETSIZE determines the size of various data types/structures. Most
> importantly the fd_set datatype which is used at various places in
> glibc.
>
> The kernel seems to be clean from dependencies on FD_SETSIZE now, but I
> cannot guarantee it.

My rule of thumb is to never use a fd configuration where the kernel's
idea of the size of an fd_set (which under linux2.2.x+ac? is whatever
you tell it) is larger than the application is compiled with from the
library headers. If it is, then you risk stack and heap corruption, and
fatal segfaults in the app.

I have a copy of the glibc source here...I don't _think_ there's much in
the way of fd_set size-dependencies in it. I'll take a look when I get a
chance. I've been meaning to for a year or so anyway.

D
Received on Wed Jul 14 1999 - 18:45:05 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:47:23 MST