From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 29098 invoked from network); 7 Aug 1998 13:20:29 -0000 Received: from mail.gmd.de (129.26.8.90) by mail2.redhat.com with SMTP; 7 Aug 1998 13:20:29 -0000 Received: from twister.gmd.de (twister.gmd.de [129.26.8.91]) by mail.gmd.de (8.8.8/8.8.8) with ESMTP id PAA01008 for ; Fri, 7 Aug 1998 15:20:04 +0200 (MET DST) Received: (from wittig@localhost) by twister.gmd.de (8.8.7/8.8.7) id PAA20609 for axp-list@redhat.com; Fri, 7 Aug 1998 15:20:04 +0200 (MET DST) Message-ID: <19980807152004.A20588@twister.gmd.de> Date: Fri, 7 Aug 1998 15:20:04 +0200 From: Georg Wittig To: axp-list@redhat.com Subject: patch for Xserver crash on alpha Mail-Followup-To: axp-list@redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i Found this one in comp.os.linux.x. Don't know yet if it really fixes the problem. ---------------------------------------------------------------------------- From: raphael@cs.uky.edu Newsgroups: comp.os.linux.x Subject: Bug fixed in XFree86 for Linux/AXP Date: Thu, 06 Aug 1998 18:40:28 GMT Message-ID: <6qctat$9fj$1@nnrp1.dejanews.com> NNTP-Posting-Host: 128.163.146.41 X-Article-Creation-Date: Thu Aug 06 18:40:28 1998 GMT A while ago I reported a bug with XF86 servers under Linux/AXP. I have now tracked down and corrected this bug. It is due to an assumption that fd_mask is 32 bits wide. On Linux/AXP, fd_mask is 65 bits wide. The symptom was that client #27 leads to a segment violation. The cure is to use lffs() instead of the library ffs(), differing only in that the parameter is long, not int. This fix needs to be placed in several locations (but not all where ffs() is used), and there is one other mod necessary. Besides minor changes to reduce the number of compiler warnings, here are the necessary fixes: ----- diff -r xc/programs/Xserver/os/WaitFor.c /tmp/xc/programs/Xserver/os/WaitFor.c 85a86,100 > #if defined(__linux__) && defined(__alpha__) /* raphael: added */ > #define ffs lffs > int lffs(unsigned long mask) { > register i; > if ( ! mask ) return 0; > i = 1; > while (! (mask & 1)) { > i++; > mask = mask >> 1; > } > return i; > } > #else > #endif > 144a160 > #define dbprintf(list) printf list /* raphael */ 422c438,439 < client_index = ConnectionTranslation[curclient + (i << 5)]; --- > client_index = /* raphael: modified */ > ConnectionTranslation[curclient + (i * (sizeof(__fd_mask) * 8))]; diff -r xc/programs/Xserver/os/connection.c /tmp/xc/programs/Xserver/os/connecti on.c 167a168,172 > #if defined(__linux__) && defined(__alpha__) /* raphael: added */ > #define ffs lffs > extern int lffs(long); > #endif > diff -r xc/programs/Xserver/os/io.c /tmp/xc/programs/Xserver/os/io.c 87a88,92 > #if defined(__linux__) && defined(__alpha__) /* raphael: added */ > #define ffs lffs > extern int lffs(long); > #endif > 970c975,976 < register int index, base, mask; --- > register int index, base; > register long mask; /* raphael */ -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum -- Georg Wittig GMD email:Georg.Wittig@gmd.de - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Remove /etc/passwd. Remove /etc/group too, if you want to make it interesting... Then reboot the machine.