[Mesa-dev] [Bug 69047] [swrast] piglit occulsion-query-discard regression

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Sep 6 12:09:52 PDT 2013


https://bugs.freedesktop.org/show_bug.cgi?id=69047

--- Comment #1 from Vinson Lee <vlee at freedesktop.org> ---
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  }

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130906/833fad05/attachment.html>


More information about the mesa-dev mailing list