This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Re: XWin 4.3.0-50 crashes with -multiwindow
- From: fabrizio dot ge at tiscali dot it
- To: cygwin-xfree at cygwin dot com
- Cc: huntharo at msu dot edu
- Date: Tue, 23 Mar 2004 13:53:48 +0100
- Subject: Re: XWin 4.3.0-50 crashes with -multiwindow
- Reply-to: cygwin-xfree at cygwin dot com
Harold and all,
I built XWin from source and debugged with gdb, and in that way I was able
to track down the bug. It is due to my visual being 24bpp. It does not occur
if it is changed to 16bpp. 32bpp is not available, but I am confident everything
would work in that case.
Here is what happens:
- winScaleXBitmapToWindows is called. The pixmap passed has height 42, width
48 and bitsPerPixel 24
- effXBPP is 24, xStride is 144 (48*(24/8))
- iconData is allocated as an array of 144*42 bytes
- then, miGetImage is called. Here the line
linelength = PixmapBytePad(w, depth);
is executed with w=48 and depth=24. As a result, linelength is 192 (48*4),
not 144 (48*3).
- in the following for cycle, pDst (initialized as iconData) is incremented
by linelength(=192) each time. Soon the pointer overflows the allocated
bounds, causing the crash.
It seems that handling of 24-bit display is broken. Maybe winScaleXBitmapToWindows
should use PixmapBytePad to calculate xStride, but I'm only guessing as
I'm not an expert.
Regards,
Fabrizio
>I then compiled VICE (http://www.viceteam.org) and launched the program
>x64 with option -display in order to make it use my Cygwin X server. If
>the
>server is launched with -multiwindow, it crashes
__________________________________________________________________
ADSL Senza Canone 640Kbps:
attivala entro il 31 marzo e avrai GRATIS il costo di adesione,
quello di attivazione e il modem per tutto il 2004.
E per i primi 3 mesi navighi a 1,5 euro l'ora! Affrettati!
http://point.tiscali.it/adsl/prodotti/senzacanone/