<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - GLX_NONE != None"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=91293">91293</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>GLX_NONE != None
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>cairo
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>gl backend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>cairo-bugs@cairographics.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>sixtysix@inwind.it
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>cairo-bugs@cairographics.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Running:

<span class="quote">>(cd test; DISPLAY=:2 CAIRO_TEST_TARGET=gl valgrind --track-origins=yes .libs/cairo-test-suite -f text-antialias-gray )</span >

valgrind reports:

<span class="quote">>==10525== Conditional jump or move depends on uninitialised value(s)
>==10525==    at 0x393C81C995: ??? (in /usr/lib64/libGL.so.1.2.0)
>==10525==    by 0x393C819E11: glXChooseVisual (in /usr/lib64/libGL.so.1.2.0)
>==10525==    by 0x45EDB8: _cairo_boilerplate_gl_create_surface (cairo/boilerplate/cairo-boilerplate-glx.c:123)
>==10525==    by 0x40DD4C: cairo_test_for_target (cairo/test/cairo-test.c:819)
>==10525==    by 0x40EEC1: _cairo_test_context_run_for_target (cairo/test/cairo-test.c:1551)
>==10525==    by 0x40BB13: _cairo_test_runner_draw (cairo/test/cairo-test-runner.c:255)
>==10525==    by 0x40BB13: main (cairo/test/cairo-test-runner.c:937)
>==10525==  Uninitialised value was created by a stack allocation
>==10525==    at 0x45EC40: _cairo_boilerplate_gl_create_surface (cairo/boilerplate/cairo-boilerplate-glx.c:78)</span >


looking what's allocated on the stack in
boilerplate/cairo-boilerplate-glx.c around line 78:

<a href="http://cgit.freedesktop.org/cairo/tree/boilerplate/cairo-boilerplate-glx.c#n78">http://cgit.freedesktop.org/cairo/tree/boilerplate/cairo-boilerplate-glx.c#n78</a>

you can see that the attribute list is terminated by GLX_NONE, but
the man page of 'glXChooseVisual' says it must be terminated with None.

on my laptop  grep says:
[massimo@laptop cairo (master *)]$ grep None /usr/include/X11/X.h
#define None                 0L /* universal null resource or null atom */
[massimo@laptop cairo (master *)]$ grep GLX_NONE /usr/include/GL/glx.h
#define GLX_NONE                        0x8000

so they're not interchangeable. And ending the attribute list
with 'None' valgrind does not report this particular warning.

My suggestion here is:

sed -i 's/GLX_NONE/None/' boilerplate/cairo-boilerplate-glx.c
make -C boilerplate libcairoboilerplate.la && make -C test</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>