[Mesa-dev] [PATCH 03/13] glx: Fix handling of property list received from the server in glXImportContextEXT
idr at freedesktop.org
Fri Dec 16 17:20:21 PST 2011
On 12/16/2011 03:33 PM, Eric Anholt wrote:
> On Fri, 16 Dec 2011 11:55:40 -0800, "Ian Romanick"<idr at freedesktop.org> wrote:
>> From: Ian Romanick<ian.d.romanick at intel.com>
>> NOTE: This is a candidate for the 7.11 branch.
> I couldn't work out what was actually being fixed here, unless
> it's "fbconfigid should take precedence over visualid".
Crap. I thought I wrote a credible commit message for that patch, but
it looks like the text never got from my brain to the commit message.
The problem is that the number of reply bytes read is clamped to
sizeof(propList), but the loop that processes the properties tries to
examine all of them. If the server sends 47,000 properties, we only
read 3 but process all 47,000.
It now occurs to me that the __GLX_MAX_CONTEXT_PROPS define in
glxproto.h is rubbish. The server should send 4 properties: screen,
fbconfig ID (or visual ID), share context ID, and render type. Ugh.
I'll re-spin this patch with a better commit message, and I'll change
int propList[__GLX_MAX_CONTEXT_PROPS * 2], *pProp, nPropListBytes;
/* This GLX implementation knows about 5 different properties, so
* allow the server to send us one of each.
int propList[5 * 2], *pProp, nPropListBytes;
More information about the mesa-dev