miFillRectPolyHelper blows up

Egbert Eich eich at suse.de
Sat Apr 1 09:01:27 PST 2006


Egbert Eich writes:
 > Daniel Stone writes:
 >  > On Fri, Mar 31, 2006 at 07:21:10PM +0200, Egbert Eich wrote:
 >  > > Should be fixed now. Stupid last minute change.
 >  > 
 >  > AFAICT, the whole tmpPixel thing is a no-op as well, meaning there's
 >  > effectively been no change to miwideline.c?
 > 
 > This probably depends on the compiler. Some compilers seem to 
 > treat this differently. The problem happens on PPC64 and S390x.
 > Both are BE 64bit.
 > I've trusted the patch (and simpified it slightly :-{)
 > I have neither system here ;-) - and didn't want to set it up 
 > remotely. 

Stupid me!
Of course the old construct:

void baz(unsigned int *bar);

...
foo(unsigned long bar)
{
	baz((unsigned int *)&bar);
}

is completely bogus. 

This is one of the 32bit-isms that have survived.
It happens to work on LP64 LE also. On LP64 BE it 
grabs the wrong end of the number.

doing:
      static unsigned int tmp = bar;
      baz(&tmp);

is *not* a no-op but should give the compiler the 
right idea. (a cast is neither required nor should 
it hurt).

Cheers,
	Egbert.



More information about the xorg mailing list