Bug 32879

Summary: egl_glx driver segfaults with NULL config
Product: Mesa Reporter: nobled <nobled>
Component: OtherAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: 7.9   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

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.