From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 26174 invoked from network); 24 Apr 1998 21:20:13 -0000 Received: from mea.tmt.tele.fi (root@194.252.70.2) by mail2.redhat.com with SMTP; 24 Apr 1998 21:20:13 -0000 Received: by mea.tmt.tele.fi id <92201-299>; Sat, 25 Apr 1998 00:19:20 +0300 Subject: XFree86/332 and Matrox Millenium II on Alpha... To: axp-list@redhat.com Date: Sat, 25 Apr 1998 00:19:19 +0300 (EEST) Cc: xfree86@xfree86.org From: Matti Aarnio Phone: +358-20402082 (office, with redirection to cellular) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <19980424211924Z92201-299+2@mea.tmt.tele.fi> Hello, Sorry, no diffs available yet, but this should be enough for experienced programmers to hunt it down. Perhaps you have observed that there is something wrong with XF86_SVGA on Alpha Linuxes. It is easy to crash the X-server if you have MGA cards in use. Basically the bug is doing code like this: u_char *ptr = someinputvalue; ptr = (u_char *)((int)ptr & ~0x03); What happens there ? Systems with sizeof(void*) == sizeof(int) behave well with that, but Alpha isn't such a system... With crash traces (GDB attached to the running XF86_SVGA at the time of crash) I found that this happened in routine MGAWriteBitmap Changeing that faulty code to form: ptr = (u_char *)((long)ptr & ~0x03L); made it work successfully. The original pointer was pointing to somewhere around address 4.8 G, which became truncated into somewhere around 0.5G, and of course segfaulted.. Another matter is this nuisance of unaligned trap report: X(13071): unaligned trap at 000000012021fe64: 000000012076e624 2d 8 (gdb) list *0x000000012021fe64 0x12021fe64 is in cfb32SegmentSS1RectCopy (cfb8segC.c:910). 905 addrp += PPW; 906 } 907 #if 0 908 RROP_SPAN_lu(addrp, x1_or_len) 909 #else 910 RROP_SPAN(addrp, x1_or_len) 911 #endif Which when written open is: (most likely) 910 while (--(x1_or_len) >= 0) { 911 RROP_SOLID((unsigned long *) (addrp)); 912 (addrp) += sizeof (unsigned long) / sizeof (*addrp); 913 } Looking inside RROP_SOLID seems to be storing something through the (unsigned long*) pointer, but the pointer is aligned on 32-bit (int*) object... Another 64-bit system goof-up there. This one is towards the end of hundreds of lines long procedure, thus I have no idea what goes wrong there. /Matti Aarnio