<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Segmentation fault in _cairo_traps_compositor_glyphs"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=103037#c25">Comment # 25</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Segmentation fault in _cairo_traps_compositor_glyphs"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=103037">bug 103037</a>
              from <span class="vcard"><a class="email" href="mailto:psychon@znc.in" title="Uli Schlachter <psychon@znc.in>"> <span class="fn">Uli Schlachter</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=134722" name="attach_134722" title="Surround initialisations with atomic critical section">attachment 134722</a> <a href="attachment.cgi?id=134722&action=edit" title="Surround initialisations with atomic critical section">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=103037&attachment=134722'>[review]</a>
Surround initialisations with atomic critical section

Review of <span class=""><a href="attachment.cgi?id=134722" name="attach_134722" title="Surround initialisations with atomic critical section">attachment 134722</a> <a href="attachment.cgi?id=134722&action=edit" title="Surround initialisations with atomic critical section">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=103037&attachment=134722'>[review]</a>:
-----------------------------------------------------------------

+1 for the patch, thanks!

<span class="quote">> However I have run some more tests and it now looks like gcc (4.8.2) produces identical code for "if (y)" and "if (__atomic_load_n(&y,__ATOMIC_X))" for all valid values of X, even SEQ_CST (!). I was basing my comments on attempts to use the __sync operations. Absolutely I would recommend using __atomic in all code from now on (if in fact gcc is correct, I am surprised there is no sync or other added instruction).

> It seems correct to use the acquire/release types for this init flag, but since it produces identical code on x86 there could be a worry that this will be insufficiently tested.</span >

According to the second result Google gave me, this is correct:
<a href="https://www.cl.cam.ac.uk/~pes20/cpp/cpp0xmappings.html">https://www.cl.cam.ac.uk/~pes20/cpp/cpp0xmappings.html</a></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>