[Piglit] [PATCH 2/2] glx-destroycontext-3: A new way to mess with glXDestroyContext().
brian.e.paul at gmail.com
Fri Feb 4 16:04:21 PST 2011
On Fri, Feb 4, 2011 at 4:48 PM, Eric Anholt <eric at anholt.net> wrote:
> A side note: There's some weird spec text about contexts. They're
> pointers to GLX structures, so they're freed on destroy. But if you
> destroy a pointer that "is not a valid rendering context", it's
> supposed to throw GLXBadContext. I'm not sure how it should intuit
> that some arbitrary pointer is not a valid context without
> dereferencing that pointer and segfaulting instead.
I think once upon a time, GLXContext was defined in glx.h as an opaque
handle, like an X GC or GLXDrawable. If that was the case, the
GLXContext handle could be validated. Maybe that's where the language
Of course, context pointers could be validated too if we kept a list
of all the contexts we've created.
More information about the Piglit