Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Matti Aarnio <matti.aarnio@sonera.fi>
To: axp-list@redhat.com
Cc: xfree86@xfree86.org
Subject: XFree86/332 and Matrox Millenium II on Alpha...
Date: Sat, 25 Apr 1998 00:19:19 +0300 (EEST)	[thread overview]
Message-ID: <19980424211924Z92201-299+2@mea.tmt.tele.fi> (raw)

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	<matti.aarnio@sonera.fi>
		<mea@nic.funet.fi>


                 reply	other threads:[~1998-04-24 21:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox