Summary: | [swrast] piglit occulsion-query-discard regression | ||
---|---|---|---|
Product: | Mesa | Reporter: | Vinson Lee <vlee> |
Component: | Mesa core | Assignee: | mesa-dev |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | critical | ||
Priority: | medium | CC: | t_arceri |
Version: | git | Keywords: | regression |
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Vinson Lee
2013-09-06 18:51:08 UTC
Looks like the field ql_query_object:Label was not initialized. (gdb) frame 5 #5 0x00007fd3839867e4 in _mesa_delete_query (ctx=0x7fd387f4a010, q=0x268e090) at ../../../src/mesa/main/queryobj.c:129 129 free(q->Label); ==15578== Conditional jump or move depends on uninitialised value(s) ==15578== at 0x4C2BA22: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==15578== by 0x91DE7E3: _mesa_delete_query (queryobj.c:129) ==15578== by 0x91DED5A: _mesa_DeleteQueries (queryobj.c:257) ==15578== by 0x4EB4E32: stub_glDeleteQueries (generated_dispatch.c:5548) ==15578== by 0x401310: piglit_display (occlusion-query-discard.c:122) ==15578== by 0x4EA8017: display (piglit_glut_framework.c:60) ==15578== by 0x5780FC3: fghcbDisplayWindow (in /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0) ==15578== by 0x5784718: fgEnumWindows (in /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0) ==15578== by 0x578145B: glutMainLoopEvent (in /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0) ==15578== by 0x5781D80: glutMainLoop (in /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0) ==15578== by 0x4EA8246: run_test (piglit_glut_framework.c:142) ==15578== by 0x4EA6188: piglit_gl_test_run (piglit-framework-gl.c:141) ==15578== Uninitialised value was created by a heap allocation ==15578== at 0x4C2CD7B: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==15578== by 0x91DE6E3: _mesa_new_query_object (queryobj.c:46) ==15578== by 0x91DEAD6: _mesa_GenQueries (queryobj.c:216) ==15578== by 0x4EBCBD4: stub_glGenQueries (generated_dispatch.c:9374) ==15578== by 0x401138: piglit_display (occlusion-query-discard.c:89) ==15578== by 0x4EA8017: display (piglit_glut_framework.c:60) ==15578== by 0x5780FC3: fghcbDisplayWindow (in /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0) ==15578== by 0x5784718: fgEnumWindows (in /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0) ==15578== by 0x578145B: glutMainLoopEvent (in /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0) ==15578== by 0x5781D80: glutMainLoop (in /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0) ==15578== by 0x4EA8246: run_test (piglit_glut_framework.c:142) ==15578== by 0x4EA6188: piglit_gl_test_run (piglit-framework-gl.c:141) src/mesa/main/queryobj.c 43 static struct gl_query_object * 44 _mesa_new_query_object(struct gl_context *ctx, GLuint id) 45 { 46 struct gl_query_object *q = MALLOC_STRUCT(gl_query_object); 47 (void) ctx; 48 if (q) { 49 q->Id = id; 50 q->Result = 0; 51 q->Active = GL_FALSE; 52 53 /* This is to satisfy the language of the specification: "In the initial 54 * state of a query object, the result is available" (OpenGL 3.1 § 55 * 2.13). 56 */ 57 q->Ready = GL_TRUE; 58 59 /* OpenGL 3.1 § 2.13 says about GenQueries, "These names are marked as 60 * used, but no object is associated with them until the first time they 61 * are used by BeginQuery." Since our implementation actually does 62 * allocate an object at this point, use a flag to indicate that this 63 * object has not yet been bound so should not be considered a query. 64 */ 65 q->EverBound = GL_FALSE; 66 } 67 return q; 68 } commit 0a0f543082ce3bbee3d09425a912a9181128a257 Author: Vinson Lee <vlee@freedesktop.org> Date: Fri Sep 6 12:27:11 2013 -0700 mesa: Ensure gl_query_object is fully initialized. 278372b47e4db8a022d57f60302eec74819e9341 added the uninitialized pointer field gl_query_object:Label. A free of this pointer resulted in a crash. This patch fixes piglit regressions with swrast introduced by 6d8dd59cf53d2f47b817d79204a52bb3a46e8c77. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69047 Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com> |
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.