<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:zan&#64;falconsigh.net" title="Zan Dobersek &lt;zan&#64;falconsigh.net&gt;"> <span class="fn">Zan Dobersek</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Wayland] PlatformDisplayWayland destructor is super crashy"
   href="https://bugs.webkit.org/show_bug.cgi?id=157973">bug 157973</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
               &nbsp;
           </td>
           <td>zan&#64;falconsigh.net
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Wayland] PlatformDisplayWayland destructor is super crashy"
   href="https://bugs.webkit.org/show_bug.cgi?id=157973#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Wayland] PlatformDisplayWayland destructor is super crashy"
   href="https://bugs.webkit.org/show_bug.cgi?id=157973">bug 157973</a>
              from <span class="vcard"><a class="email" href="mailto:zan&#64;falconsigh.net" title="Zan Dobersek &lt;zan&#64;falconsigh.net&gt;"> <span class="fn">Zan Dobersek</span></a>
</span></b>
        <pre>If we're committed to destructing the PlatformDisplay object, then using atexit() manually might work better than a static std::unique_ptr&lt;&gt; object.

The PlatformDisplayWayland constructor would do the EGL initialization, setting up exit-time callbacks in Mesa. We should register the destruction of this object with atexit() afterwards, since the callbacks passed to atexit() are called in reverse order.

This showcases the problem:
<a href="https://www.ibm.com/developerworks/community/blogs/5894415f-be62-4bc0-81c5-3956e82276f3/entry/be_careful_when_using_the_atexit_routine_with_static_objects?lang=en">https://www.ibm.com/developerworks/community/blogs/5894415f-be62-4bc0-81c5-3956e82276f3/entry/be_careful_when_using_the_atexit_routine_with_static_objects?lang=en</a></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>