Bug 32879 - egl_glx driver segfaults with NULL config
Summary: egl_glx driver segfaults with NULL config
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: 7.9
Hardware: All All
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-06 12:26 UTC by nobled
Modified: 2011-01-23 20:00 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description nobled 2011-01-06 12:26:49 UTC
egl_dri2 seems to handle this fine, but egl_glx tries to dereference it in this function:

static int
GLX_egl_config_index(_EGLConfig *conf)
{
   struct GLX_egl_config *GLX_conf = GLX_egl_config(conf);
   return GLX_conf->index;
}

So it segfaults when it tries to create a context on this line in GLX_eglCreateContext:

      GLX_ctx->context =
         glXCreateNewContext(GLX_dpy->dpy,
                             GLX_dpy->fbconfigs[GLX_egl_config_index(conf)],
                             GLX_RGBA_TYPE,
                             GLX_ctx_shared ? GLX_ctx_shared->context : NULL,
                             GL_TRUE);
Comment 1 Chia-I Wu 2011-01-06 21:07:56 UTC
There is a bug in 7.9 that makes NULL config to slip.  I've cherry-picked the fix to it.  Do you see this on all versions?  When is config NULL?
Comment 2 nobled 2011-01-23 20:00:18 UTC
(In reply to comment #1)
> There is a bug in 7.9 that makes NULL config to slip.  I've cherry-picked the
> fix to it.  Do you see this on all versions?  When is config NULL?

It happened in just 7.9, when I called eglCreateContext(dpy, NULL, EGL_NO_CONTEXT, attribs) -- commit 110c49fddd7a111288946255477ea3a354db49e8 seems to have fixed it, thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.