Bug 23489 - empty glBegin/glEnd clauses crash
Summary: empty glBegin/glEnd clauses crash
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
URL: https://bugs.launchpad.net/bugs/346072
Whiteboard:
Keywords:
: 20850 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-08-24 11:26 UTC by Tormod Volden
Modified: 2009-08-25 00:47 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
test case (1014 bytes, text/plain)
2009-08-24 11:26 UTC, Tormod Volden
Details

Description Tormod Volden 2009-08-24 11:26:27 UTC
Created attachment 28886 [details]
test case

If for instance,
       glBegin(GL_LINES);
       glEnd();
is repeated (64 times here) mesa will crash with

Program received signal SIGFPE, Arithmetic exception.
0x0109d5a0 in vbo_exec_vtx_flush (exec=0x809fc98, unmap=0 '\0')

because exec->vtx.vertex_size = 0 and we get a division by zero. Not that this is a useful construct, but it happens in some programs and did not crash before. http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/begin.html says "Lines, triangles,	quadrilaterals,	and polygons that	are incompletely specified are not drawn."

The attached test program demonstrates the crash (it is based on the example in http://glprogramming.com/red/chapter01.html :) )
Comment 1 Brian Paul 2009-08-24 11:45:13 UTC
Fixed with commit b9b04872d526ed7955f647542399e110ace0325c.
This'll be in Mesa 7.5.1 and later.
Comment 2 Tormod Volden 2009-08-25 00:47:57 UTC
*** Bug 20850 has been marked as a duplicate of this bug. ***


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.