Bug 26832

Summary: [bisected glx]: assert triggered by kwin, when glxCreateWindow is called with NULL attrib_list
Product: Mesa Reporter: Magnus Kessler <Magnus.Kessler>
Component: GLXAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: proposed fix

Description Magnus Kessler 2010-03-01 22:44:44 UTC
KDE's kwin calls glxCreateWindow with NULL as the attrib_list parameter when it sets up OpenGL based compositing. Since Mesa commit 706fffbff59be0dc884e1938f1bdf731af1efa3e this triggers an assert in CreateDrawable (glx_pbuffer.c:382), and the application crashes.

The man page for glxCreateWindow states explicitly that NULL is allowed to be passed as a value to the attrib_list parameter (http://www.opengl.org/sdk/docs/man/xhtml/glXCreateWindow.xml).
Comment 1 Magnus Kessler 2010-03-01 22:50:14 UTC
Created attachment 33677 [details] [review]
proposed fix

On closer inspection it appears that the variable "data" in glx_puffer.c CreateDrawable is essentially unused. Removing this variable should fix the issue of copying data from NULL, which commit 706fffbff59be0dc884e1938f1bdf731af1efa3e tried to guard against.
Comment 2 Brian Paul 2010-03-02 06:38:01 UTC
The proposed fix is incorrect.  We need to append the attrib_list information to the protocol request.  I'm replacing the assertion with a conditional.  See commit 44f6bb1ddf2ffda93a8f1ecf3eca3f051939482b on master and eede72b0f92ae49ed8c22f3210e615108a5e2b0a on the 7.7 branch.

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.