Bug 26768 - Segmentation fault with indirect rendering
Summary: Segmentation fault with indirect rendering
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: GLX (show other bugs)
Version: 7.6
Hardware: All All
: medium major
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-26 02:44 UTC by Markus Fleschutz
Modified: 2010-02-26 09:36 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.