* patch for Xserver crash on alpha
@ 1998-08-07 13:20 Georg Wittig
1998-08-07 13:38 ` Matti Aarnio
0 siblings, 1 reply; 2+ messages in thread
From: Georg Wittig @ 1998-08-07 13:20 UTC (permalink / raw)
To: axp-list
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: patch for Xserver crash on alpha
1998-08-07 13:20 patch for Xserver crash on alpha Georg Wittig
@ 1998-08-07 13:38 ` Matti Aarnio
0 siblings, 0 replies; 2+ messages in thread
From: Matti Aarnio @ 1998-08-07 13:38 UTC (permalink / raw)
To: axp-list
Georg Wittig <Georg.Wittig@gmd.de> refers
> Found this one in comp.os.linux.x. Don't know yet if it really fixes
> the problem.
It isn't sufficient cure. Have a look at:
ftp://mea.tmt.tele.fi/pub/XFree86/XFree86-3.3-alpha3-sockets.patch
/Matti Aarnio <matti.aarnio@sonera.fi>
> ----------------------------------------------------------------------------
> 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:
...
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1998-08-07 13:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-08-07 13:20 patch for Xserver crash on alpha Georg Wittig
1998-08-07 13:38 ` Matti Aarnio
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox