From owner-freebsd-current Tue Apr 1 11:52:22 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id LAA24869 for current-outgoing; Tue, 1 Apr 1997 11:52:22 -0800 (PST) Received: from enst.enst.fr (uaNx6xk4g5ziWN+RpsmVNgoi0GbIA9Jt@enst.enst.fr [137.194.2.16]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id LAA24861 for ; Tue, 1 Apr 1997 11:52:17 -0800 (PST) Received: from email.enst.fr (email.enst.fr [137.194.168.17]) by enst.enst.fr (8.8.4/8.8.4) with ESMTP id VAA13935 for ; Tue, 1 Apr 1997 21:52:12 +0200 (MET DST) Received: from nikopol.enst.fr (nikopol.enst.fr [137.194.168.105]) by email.enst.fr (8.8.4/8.8.4) with ESMTP id VAA01822; Tue, 1 Apr 1997 21:52:05 +0200 (MET DST) Received: (from fenyo@localhost) by nikopol.enst.fr (8.8.4/8.8.4) id VAA24028; Tue, 1 Apr 1997 21:52:04 +0200 (MET DST) To: freebsd-current@freebsd.org Subject: Bugs in libc_r X-WWW: http://home.eowyn.fr.eu.org/~fenyo/documents/axel.html X-PGP-Key: finger alex@eowyn.fr.eu.org X-NIC-Handle: AF713 X-Whois: whois -h whois.internic.net fenyo X-Pager: 06-04-30-75-94 (for emergency only) Organization: Ecole Nationale Superieure des Telecommunications de Paris From: fenyo@email.enst.fr (Alex Fenyo (eowyn)) Date: 01 Apr 1997 21:52:03 +0200 Message-ID: Lines: 23 X-Mailer: Red Gnus v0.50/XEmacs 19.14 Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hello, The same bug is repeated 4 times in libc_r. The problem is that the operator '&' has a lower precedence than '==' in C, and the author of the code forgot it at 4 places in the source : in /usr/src/lib/libc_r/uthread/uthread_read.c : ------------------------------------------------------------ if (_thread_fd_table[fd]->flags & O_NONBLOCK == 0 && (errno == EWOULDBLOCK || errno == EAGAIN)) { ------------------------------------------------------------ should be replaced by : ------------------------------------------------------------ if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 && (errno == EWOULDBLOCK || errno == EAGAIN)) { ------------------------------------------------------------ The same replacement should be done in : uthread_readv.c, uthread_write.c, uthread_writev.c Could someone apply the modifications ? Alexandre Fenyo