[X-tt-list:108] Re: (patch seq: 5752) A patch for preventing XAA crash

Zurück zum Archiv-Index

Koike Kazuhiko kazhi****@mozil*****
2003年 8月 16日 (土) 07:29:15 JST


On 08/15/2003 09:23 PM, David Dawes wrote:
>>Index: xaaPCache.c
>>===================================================================
>>RCS file: /home/x-cvs/xc/programs/Xserver/hw/xfree86/xaa/xaaPCache.c,v
>>retrieving revision 1.30
>>diff -u -r1.30 xaaPCache.c
>>--- xaaPCache.c	25 Sep 2000 23:56:14 -0000	1.30
>>+++ xaaPCache.c	15 Aug 2003 02:18:24 -0000
>>@@ -763,6 +763,7 @@
>>	1) Don't take up more than half the memory.
>>	2) Don't bother if you can't get at least four.
>>	3) Don't make more than MAX_512.
>>+	4) Don't have any of there are no 256x256s.
>>
>>     256x256 -
>>	1) Don't take up more than a quarter of the memory enless there
>>@@ -785,6 +786,13 @@
>>    if(!Target512) Target256 = ntotal >> 3;
>>    else Target256 = ntotal >> 4;
>>    if(Target256 < 4) Target256 = 0;
>>+
>>+    if(Num512 && !Num256) {
>>+	while(Num512 && Num256 < Target256) {
>>+	   SubdivideList(&List512, &List256);
>>+	   Num256 += 4; Num512--;
>>+	}
>>+    }
>>
>>    if(!Num512) { /* no room */
>>    } else if((Num512 < 4) || (!Target512)) {
> 
> 
> 
> It occurred to me this morning that 'if(Num512 && !Num256)' needs to
> be 'if(Num512 && Num256 < 4)'.  The case that was reported had Num256
> initially 3, not 0.
> 
> David

I applied your patch. That seems to work fine. My X doesn't crash.

Koike Kazuhiko




X-tt-list メーリングリストの案内
Zurück zum Archiv-Index