This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

Bugs in glibc 2.2


Hi,

I am working on several bugs in glibc 2.2. I had an impression that
glibc 2.2 was very unstable. I was wondering how many people were
using glibc 2.2. To start,

There are

struct __res_state _res;

and

void
res_close(void) {
        res_nclose(&_res);
}

void
res_nclose(res_state statp) {
        if (statp->_sock >= 0) {
                (void) close(statp->_sock);
                statp->_sock = -1;
                statp->_flags &= ~(RES_F_VC | RES_F_CONN);
        }
}

since _res._sock is 0, close (0) is called. It is very bad
when 0 may be a valid fd for something else. There are other
bugs I am trying to do down. For example,

# man read 

no longer works.


H.J.


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