Re: gdk_draw_segments crash the application when called with more than 32767 segments.

On Tue, 2004-02-17 at 04:39, David Odin wrote:

> > > >  - What's the interaction of this with maximum request sizes? Is 
> > > >    32767 really the right figure here or just an approximation 
> > > >    that works on your system?
> > > > 
> > >   The error message I got told me this should be a 16 bits value...
> > 
> > Having only 16 bits to store the length is one thing (which gives you an
> > upper bound of
> > 32767), but the X protocol also has a maximal request size, which can vary
> > from server to server. So even if the X protocol may allow an XDrawSegments
> > request with 32767 segments, it may be too large for the server you're talking
> > with.
> > 
>  An old documentation I have here, about X11R4, says that we should use
> the value returned by XMaxRequestSize minus 3 divided by 2. This really
> looks like black magic to me, but this wouldn't be hard to implement.

If you look in the X protocol docs, then you'll see where it comes
from, but actually, you'll find in the docs for XMaxRequestSize:

       Xlib automatically breaks data
       up into multiple protocol requests as necessary for the following
       tions: XDrawPoints, XDrawRectangles, XDrawSegments, XFillArcs,
       Rectangles, and XPutImage.

So, research determines that this isn't an issue. On the other hand,
I see no evidence supporting a value of 32767... can you explain
why you think this is a relevant value? 

> Can we move this discussion to bugzilla, so the comments won't be
> forgotten?

I put a link in bugzilla to this thread earlier.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]