Re: Possible bug in xaaFillPoly.c

2003-03-24 Thread Alexandr Andreev
Mark Vojkovich wrote:
   Can you try the attached patch?

X work stable now, core is not dumped, and verification test (xsuit, 
chapter 06)
passed too. I guess, you may commit the patch.

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Possible bug in xaaFillPoly.c

2003-03-24 Thread Mark Vojkovich
  Thanks for verifying.  The fix has been committed to CVS.


Mark.

On Mon, 24 Mar 2003, Alexandr Andreev wrote:

 Mark Vojkovich wrote:
  
 Can you try the attached patch?
  
 
 X work stable now, core is not dumped, and verification test (xsuit, 
 chapter 06)
 passed too. I guess, you may commit the patch.
 
 

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Possible bug in xaaFillPoly.c

2003-03-20 Thread Mark Vojkovich

   This is not the correct solution.  Mono8x8PatternRectHelper needs
a pattern, yet the API doesn't pass one.  It was intended that
it be passed in pCache-pat, yet that wasn't set up.  There
was a scratch cache structure set aside for that type of thing.

   Can you try the attached patch?


MArk.

On Wed, 19 Mar 2003, Mark Vojkovich wrote:

 
There's definitely a bug there.  I'm not sure if that's the
 correct solution, or there is a bigger problem.  I will review
 this code tonight.  Thanks for pointing this out.
 
 
   Mark.
 
 
 On Wed, 19 Mar 2003, Alexandr Andreev wrote:
 
  Hi,
  Possible, there is a bug in the Mono8x8PatternRectHelper() function.
  Lets look at XAAFillPolygonStippled():
  Assume:
  1. type == DO_MONO_8x8,
  2. infoRec-Mono8x8PatternFillFlags:
  HARDWARE_PATTERN_SCREEN_ORIGIN   is NOT set,
  HARDWARE_PATTERN_PROGRAMMED_BITS   is set,
  HARDWARE_PATTERN_PROGRAMMED_ORIGIN is NOT set.
  In this case, pCache == NULL, and RectFunc = Mono8x8PatternRectHelper
  
  Later, in Mono8x8PatternRectHelper() we will crash when trying to access
  pCache-pat0.
  I think that this patch may help, but i'm not sure.
  
  
 
 
*** xaaFillPoly.c.old   Thu Mar 20 10:46:51 2003
--- xaaFillPoly.c   Thu Mar 20 10:54:21 2003
***
*** 770,776 
pCache = (*infoRec-CacheMono8x8Pattern)(
infoRec-pScrn, patx, paty);
patx = pCache-x;  paty = pCache-y;
!   }
RectFunc = Mono8x8PatternRectHelper;
}
  
--- 770,780 
pCache = (*infoRec-CacheMono8x8Pattern)(
infoRec-pScrn, patx, paty);
patx = pCache-x;  paty = pCache-y;
!   } else {
! pCache = (infoRec-ScratchCacheInfoRec);
! pCache-pat0 = patx;
! pCache-pat1 = paty;
! }
RectFunc = Mono8x8PatternRectHelper;
}
  


Possible bug in xaaFillPoly.c

2003-03-19 Thread Alexandr Andreev
Hi,
Possible, there is a bug in the Mono8x8PatternRectHelper() function.
Lets look at XAAFillPolygonStippled():
Assume:
1. type == DO_MONO_8x8,
2. infoRec-Mono8x8PatternFillFlags:
HARDWARE_PATTERN_SCREEN_ORIGIN   is NOT set,
HARDWARE_PATTERN_PROGRAMMED_BITS   is set,
HARDWARE_PATTERN_PROGRAMMED_ORIGIN is NOT set.
In this case, pCache == NULL, and RectFunc = Mono8x8PatternRectHelper
Later, in Mono8x8PatternRectHelper() we will crash when trying to access
pCache-pat0.
I think that this patch may help, but i'm not sure.

--- xc.orig/programs/Xserver/hw/xfree86/xaa/xaaFillPoly.c   Wed Mar 19 20:27:42 
2003
+++ xc/programs/Xserver/hw/xfree86/xaa/xaaFillPoly.cWed Mar 19 20:29:26 2003
@@ -535,9 +535,9 @@
 yorg = (y - yorg)  0x07;
 
 if(!(infoRec-Mono8x8PatternFillFlags 
-   HARDWARE_PATTERN_PROGRAMMED_ORIGIN)){
+   HARDWARE_PATTERN_PROGRAMMED_BITS)){
if(infoRec-Mono8x8PatternFillFlags  
-   HARDWARE_PATTERN_PROGRAMMED_BITS) {
+   HARDWARE_PATTERN_PROGRAMMED_ORIGIN) {
int patx = pCache-pat0; 
int paty = pCache-pat1;
XAARotateMonoPattern(patx, paty, xorg, yorg,


Re: Possible bug in xaaFillPoly.c

2003-03-19 Thread Mark Vojkovich
   There's definitely a bug there.  I'm not sure if that's the
correct solution, or there is a bigger problem.  I will review
this code tonight.  Thanks for pointing this out.


Mark.


On Wed, 19 Mar 2003, Alexandr Andreev wrote:

 Hi,
 Possible, there is a bug in the Mono8x8PatternRectHelper() function.
 Lets look at XAAFillPolygonStippled():
 Assume:
 1. type == DO_MONO_8x8,
 2. infoRec-Mono8x8PatternFillFlags:
   HARDWARE_PATTERN_SCREEN_ORIGIN   is NOT set,
   HARDWARE_PATTERN_PROGRAMMED_BITS   is set,
   HARDWARE_PATTERN_PROGRAMMED_ORIGIN is NOT set.
 In this case, pCache == NULL, and RectFunc = Mono8x8PatternRectHelper
 
 Later, in Mono8x8PatternRectHelper() we will crash when trying to access
 pCache-pat0.
 I think that this patch may help, but i'm not sure.
   
 

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel