Bug 26768

Summary: Segmentation fault with indirect rendering
Product: Mesa Reporter: Markus Fleschutz <markus.fleschutz>
Component: GLXAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: medium    
Version: 7.6   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Markus Fleschutz 2010-02-26 02:44:39 UTC
When using indirect rendering and the program "framebufferobject" from the Qt demos a segmentation fault happens.

The segmentation fault is in src/glx/x11/indirect_vertex_array.c: __glXPushArrayState(), because glPushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT) is called twice or more times.

The solution is to change src/glx/x11/indirect_vertex_array.c, line 293 (function glXInitVertexArrayState) from:

  arrays->stack = malloc(sizeof(struct array_stack_state)
                          * arrays->num_arrays);

to:

   arrays->stack = malloc( sizeof( struct array_stack_state )
                            * arrays->num_arrays *__GL_CLIENT_ATTRIB_STACK_DEPTH);
Comment 1 Brian Paul 2010-02-26 09:36:21 UTC
Thanks.  I've committed your fix.
83f1183e769777df5ada4bf7add3390881f88d02

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.