<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [swrast] piglit occulsion-query-discard regression"
href="https://bugs.freedesktop.org/show_bug.cgi?id=69047#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [swrast] piglit occulsion-query-discard regression"
href="https://bugs.freedesktop.org/show_bug.cgi?id=69047">bug 69047</a>
from <span class="vcard"><a class="email" href="mailto:vlee@freedesktop.org" title="Vinson Lee <vlee@freedesktop.org>"> <span class="fn">Vinson Lee</span></a>
</span></b>
<pre>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 }</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>