Date: Thu, 27 Jul 2000 18:08:39 -0400 From: Mark Abene <phiber@radicalmedia.com> To: Andrew Gallatin <gallatin@cs.duke.edu> Cc: "David O'Brien" <obrien@FreeBSD.ORG>, freebsd-alpha@FreeBSD.ORG Subject: Re: select problems ( was Re: weird XFree86 3.3.6 behavior...) Message-ID: <20000727180839.B19445@radicalmedia.com> In-Reply-To: <14720.44407.464338.134415@grasshopper.cs.duke.edu>; from Andrew Gallatin on Thu, Jul 27, 2000 at 05:47:14PM -0400 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> <14720.44407.464338.134415@grasshopper.cs.duke.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
--Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii On Thu, Jul 27, 2000 at 05:47:14PM -0400, Andrew Gallatin wrote: > > 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.. > And it was! I've fixed the problem. I feel silly now, as looking at the same function in XFree86-4, they fixed it the same way I did for 3.3.6. :) Please accept the attached patch, in the hopes that it'll get integrated into the XFree86 port (3.3.6). Anyone using 3.3.6 should definitely patch and rebuild their X server. Cheers, -Mark --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="xf86-336.diff" --- XFree86/work/xc/programs/Xserver/os/connection.c.orig Tue Jul 25 17:42:06 2000 +++ XFree86/work/xc/programs/Xserver/os/connection.c Thu Jul 27 17:56:36 2000 @@ -1004,13 +1004,13 @@ while (mask) { curoff = ffs (mask) - 1; - curclient = curoff + (i << 5); + curclient = curoff + (i * (sizeof(fd_mask)*8)); FD_ZERO(&tmask); FD_SET(curclient, &tmask); r = Select (curclient + 1, &tmask, NULL, NULL, ¬ime); if (r < 0) CloseDownClient(clients[ConnectionTranslation[curclient]]); - mask &= ~(1 << curoff); + mask &= ~(1L << curoff); } } #else --Kj7319i9nmIyA2yE-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000727180839.B19445>