From owner-freebsd-alpha Thu Jul 27 14:47:20 2000 Delivered-To: freebsd-alpha@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id 8468B37C111; Thu, 27 Jul 2000 14:47:16 -0700 (PDT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id RAA03924; Thu, 27 Jul 2000 17:47:15 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.9.3/8.9.1) id RAA70685; Thu, 27 Jul 2000 17:47:15 -0400 (EDT) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 27 Jul 2000 17:47:14 -0400 (EDT) To: Mark Abene Cc: "David O'Brien" , freebsd-alpha@FreeBSD.ORG Subject: Re: select problems ( was Re: weird XFree86 3.3.6 behavior...) In-Reply-To: <20000727174257.A19445@radicalmedia.com> References: <20000727022930.A9638@radicalmedia.com> <20000727000033.A44502@dragon.nuxi.com> <20000727035128.A9982@radicalmedia.com> <20000727164833.A18644@radicalmedia.com> <14720.41641.666813.600170@grasshopper.cs.duke.edu> <20000727174257.A19445@radicalmedia.com> X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid Message-ID: <14720.44407.464338.134415@grasshopper.cs.duke.edu> Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Mark Abene writes: > On Thu, Jul 27, 2000 at 05:06:55PM -0400, Andrew Gallatin wrote: > > They're using real fd_sets as args to select, however it appears they are > doing mask arithmetic with ints. This may be the problem, since an fd_set > on Alpha is 64 bits. I'll try a little experiment... That sounds suspicious.. > > What was the nature of this bug you mention? And yes, I built X from the See the CVS logs for Peter's commit to sys/types.h and kern/sys_generic.c on Feb. 20th: Fix select(2) for the Alpha. (!!) It was never returning true for fd's in the range of 32-63, 96-127 etc. The first problem was the FD_*() macros were shifting a 32 bit integer "1" left by more than 32 bits. The same problem happened in selscan(). ffs() also takes an int argument and causes failure. For cases where int == long (ie: the usual case for x86, but not always as gcc can have long being a 64 bit quantity) ffs() could be used. Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message