<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>224309</bug_id>
          
          <creation_ts>2021-04-07 15:31:41 -0700</creation_ts>
          <short_desc>[WPE] Segfault on atexit handler when loading webkit://gpu</short_desc>
          <delta_ts>2021-10-08 08:08:36 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WPE WebKit</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=217655</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Adrian Perez">aperez</reporter>
          <assigned_to name="Claudio Saavedra">csaavedra</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
    
    <cc>csaavedra</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1748098</commentid>
    <comment_count>0</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2021-04-07 15:31:41 -0700</bug_when>
    <thetext>Steps to reproduce:

 1. Run: cog -P fdo webkit://gpu
 2. Press Ctrl-W to close Cog (or run “cogctl quit”)

Backtrace:

  (gdb) bt
  #0  0x00007ffff2dbf744 in wpe_renderer_backend_egl_destroy () at /usr/lib/libwpe-1.0.so.1
  #1  0x00007ffff544629c in  () at /usr/lib/libWPEWebKit-1.0.so.4
  #2  0x00007ffff54462ba in  () at /usr/lib/libWPEWebKit-1.0.so.4
  #3  0x00007ffff2c2b697 in __run_exit_handlers () at /usr/lib/libc.so.6
  #4  0x00007ffff2c2b83e in  () at /usr/lib/libc.so.6
  #5  0x00007ffff2c13b2c in __libc_start_main () at /usr/lib/libc.so.6
  #6  0x000055555555654e in _start ()
  (gdb)

While I could try and get a backtrace from a build with debug symbols, it won&apos;t
add much more. I can see with GDB that wpe_renderer_backend_egl_create() gets called
and returns something sensible, but then wpe_renderer_backend_egl_destroy() ends up
receiving a null pointer 🤷️

This issue can be reproduced with current ToT of WPE WebKit, libwpe and WPEBackend-fdo;
but also with the most recent releases.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1748101</commentid>
    <comment_count>1</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2021-04-07 15:33:51 -0700</bug_when>
    <thetext>Interestingly enough, opening https://duckduckgo.com or anything
else over HTTP does not trigger this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1748104</commentid>
    <comment_count>2</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2021-04-07 15:36:54 -0700</bug_when>
    <thetext>(In reply to Adrian Perez from comment #1)
&gt; Interestingly enough, opening https://duckduckgo.com or anything
&gt; else over HTTP does not trigger this issue.

…which makes me wonder whether in the HTTP(s) case the atexit handlers
maybe are not even being run, which would make this related to bug #217655</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1748497</commentid>
    <comment_count>3</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2021-04-08 15:15:29 -0700</bug_when>
    <thetext>Traceback with a build that has symbols:

% lldb -- cog -P fdo webkit://gpu”
...
Process 685007 stopped
* thread #1, name = &apos;cog&apos;, stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
    frame #0: 0x00007ffff3e4caa6 libwpe-1.0.so.1`::wpe_renderer_backend_egl_destroy(backend=0x0000000000000000) at renderer-backend-egl.c:58:28
   55   {
   56       fprintf(stderr, &quot;** %s &lt;- %p\n&quot;, __func__, backend);
   57  
-&gt; 58       backend-&gt;base.interface-&gt;destroy(backend-&gt;base.interface_data);
   59       backend-&gt;base.interface_data = 0;
   60  
   61       free(backend);
(lldb) bt
* thread #1, name = &apos;cog&apos;, stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
  * frame #0: 0x00007ffff3e4caa6 libwpe-1.0.so.1`::wpe_renderer_backend_egl_destroy(backend=0x0000000000000000) at renderer-backend-egl.c:58:28
    frame #1: 0x00007ffff59b6bcb libWPEWebKit-1.0.so.3`WebCore::PlatformDisplayLibWPE::~PlatformDisplayLibWPE() [inlined] WebCore::PlatformDisplayLibWPE::~PlatformDisplayLibWPE(this=0x00007fffef6f7240) at PlatformDisplayLibWPE.cpp:71:5
    frame #2: 0x00007ffff59b6bb4 libWPEWebKit-1.0.so.3`WebCore::PlatformDisplayLibWPE::~PlatformDisplayLibWPE(this=0x00007fffef6f7240) at PlatformDisplayLibWPE.cpp:70
    frame #3: 0x00007ffff597cf52 libWPEWebKit-1.0.so.3`std::unique_ptr&lt;WebCore::PlatformDisplay, std::default_delete&lt;WebCore::PlatformDisplay&gt; &gt;::~unique_ptr() [inlined] std::default_delete&lt;WebCore::PlatformDisplay&gt;::operator(this=&lt;unavailable&gt;, __ptr=&lt;unavailable&gt;)(WebCore::PlatformDisplay*) const at unique_ptr.h:85:2
    frame #4: 0x00007ffff597cf4c libWPEWebKit-1.0.so.3`std::unique_ptr&lt;WebCore::PlatformDisplay, std::default_delete&lt;WebCore::PlatformDisplay&gt; &gt;::~unique_ptr(this=0x00007ffff7f5e300) at unique_ptr.h:361
    frame #5: 0x00007ffff38ce697 libc.so.6`__run_exit_handlers + 247
    frame #6: 0x00007ffff38ce83e libc.so.6`exit + 30
    frame #7: 0x00007ffff38b6b2c libc.so.6`__libc_start_main + 220
    frame #8: 0x000055555555765e cog`_start + 46
(lldb)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1748501</commentid>
    <comment_count>4</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2021-04-08 15:20:53 -0700</bug_when>
    <thetext>Okay, an observation: The backtrace above is from the UIProcess, which
I am quite sure it is NOT expected to instantiate PlatformDisplayLibWPE.
This may explain why wpe_renderer_backend_egl_create() is never called
in the UIProcess (which is good) but somehow the display object is created
and when the atexit handlers run of course they try to destroy an instance
that is not all valid.

Running “cog -P fdo http://wpewebkit.org” indeed does not instantiate
a display object in the UIProcess.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1748509</commentid>
    <comment_count>5</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2021-04-08 15:29:03 -0700</bug_when>
    <thetext>Here&apos;s the traceback following up to the of PlatformDisplayLibWPE
in the *UIProcess* when running “cog -P fdo webkit://gpu”:

Process 686494 stopped
* thread #1, name = &apos;cog&apos;, stop reason = breakpoint 3.2
    frame #0: 0x00007ffff59b6b34 libWPEWebKit-1.0.so.3`WebCore::PlatformDisplayLibWPE::create() [inlined] WebCore::PlatformDisplayLibWPE::PlatformDisplayLibWPE(this=0x00007fffef6f7240) at PlatformDisplayLibWPE.cpp:62:7
   59   }
   60  
   61   PlatformDisplayLibWPE::PlatformDisplayLibWPE()
-&gt; 62       : PlatformDisplay(NativeDisplayOwned::No)
   63   {
   64   #if PLATFORM(GTK)
   65       PlatformDisplay::setSharedDisplayForCompositing(*this);
(lldb) bt
* thread #1, name = &apos;cog&apos;, stop reason = breakpoint 3.2
  * frame #0: 0x00007ffff59b6b34 libWPEWebKit-1.0.so.3`WebCore::PlatformDisplayLibWPE::create() [inlined] WebCore::PlatformDisplayLibWPE::PlatformDisplayLibWPE(this=0x00007fffef6f7240) at PlatformDisplayLibWPE.cpp:62:7
    frame #1: 0x00007ffff59b6b34 libWPEWebKit-1.0.so.3`WebCore::PlatformDisplayLibWPE::create() at PlatformDisplayLibWPE.cpp:58
    frame #2: 0x00007ffff597aadc libWPEWebKit-1.0.so.3`void std::call_once&lt;WebCore::PlatformDisplay::sharedDisplay()::$_0&gt;(std::once_flag&amp;, WebCore::PlatformDisplay::sharedDisplay()::$_0&amp;&amp;)::&apos;lambda0&apos;()::__invoke() [inlined] WebCore::PlatformDisplay::createPlatformDisplay() at PlatformDisplay.cpp:123:12
    frame #3: 0x00007ffff597aad7 libWPEWebKit-1.0.so.3`void std::call_once&lt;WebCore::PlatformDisplay::sharedDisplay()::$_0&gt;(std::once_flag&amp;, WebCore::PlatformDisplay::sharedDisplay()::$_0&amp;&amp;)::&apos;lambda0&apos;()::__invoke() [inlined] WebCore::PlatformDisplay::sharedDisplay(this=&lt;unavailable&gt;)::$_0::operator()() const at PlatformDisplay.cpp:143
    frame #4: 0x00007ffff597aad7 libWPEWebKit-1.0.so.3`void std::call_once&lt;WebCore::PlatformDisplay::sharedDisplay()::$_0&gt;(std::once_flag&amp;, WebCore::PlatformDisplay::sharedDisplay()::$_0&amp;&amp;)::&apos;lambda0&apos;()::__invoke() [inlined] void std::__invoke_impl&lt;void, WebCore::PlatformDisplay::sharedDisplay()::$_0&gt;(__f=&lt;unavailable&gt;)::$_0&amp;&amp;) at invoke.h:60
    frame #5: 0x00007ffff597aad7 libWPEWebKit-1.0.so.3`void std::call_once&lt;WebCore::PlatformDisplay::sharedDisplay()::$_0&gt;(std::once_flag&amp;, WebCore::PlatformDisplay::sharedDisplay()::$_0&amp;&amp;)::&apos;lambda0&apos;()::__invoke() [inlined] std::__invoke_result&lt;WebCore::PlatformDisplay::sharedDisplay()::$_0&gt;::type std::__invoke&lt;WebCore::PlatformDisplay::sharedDisplay(__fn=&lt;unavailable&gt;)::$_0&gt;(WebCore::PlatformDisplay::sharedDisplay()::$_0&amp;&amp;) at invoke.h:95
    frame #6: 0x00007ffff597aad7 libWPEWebKit-1.0.so.3`void std::call_once&lt;WebCore::PlatformDisplay::sharedDisplay()::$_0&gt;(std::once_flag&amp;, WebCore::PlatformDisplay::sharedDisplay()::$_0&amp;&amp;)::&apos;lambda0&apos;()::__invoke() [inlined] void std::call_once&lt;WebCore::PlatformDisplay::sharedDisplay()::$_0&gt;(this=&lt;unavailable&gt;)::$_0&amp;&amp;)::&apos;lambda&apos;()::operator()() const at mutex:717
    frame #7: 0x00007ffff597aad7 libWPEWebKit-1.0.so.3`void std::call_once&lt;WebCore::PlatformDisplay::sharedDisplay()::$_0&gt;(std::once_flag&amp;, WebCore::PlatformDisplay::sharedDisplay()::$_0&amp;&amp;)::&apos;lambda0&apos;()::__invoke() [inlined] void std::call_once&lt;WebCore::PlatformDisplay::sharedDisplay()::$_0&gt;(this=&lt;unavailable&gt;)::$_0&amp;&amp;)::&apos;lambda0&apos;()::operator()() const at mutex:722
    frame #8: 0x00007ffff597aad7 libWPEWebKit-1.0.so.3`void std::call_once&lt;WebCore::PlatformDisplay::sharedDisplay()::$_0&gt;(std::once_flag&amp;, WebCore::PlatformDisplay::sharedDisplay()::$_0&amp;&amp;)::&apos;lambda0&apos;()::__invoke() at mutex:722
    frame #9: 0x00007ffff13bfc9f libpthread.so.0`__pthread_once_slow + 191
    frame #10: 0x00007ffff5974136 libWPEWebKit-1.0.so.3`WebCore::PlatformDisplay::sharedDisplay() [inlined] __gthread_once(__func=&lt;unavailable&gt;)()) at gthr-default.h:700:12
    frame #11: 0x00007ffff5974119 libWPEWebKit-1.0.so.3`WebCore::PlatformDisplay::sharedDisplay() [inlined] void std::call_once&lt;WebCore::PlatformDisplay::sharedDisplay()::$_0&gt;(__once=&lt;unavailable&gt;, __f=0x00007fffffffc258)::$_0&amp;&amp;) at mutex:729
    frame #12: 0x00007ffff59740e2 libWPEWebKit-1.0.so.3`WebCore::PlatformDisplay::sharedDisplay() at PlatformDisplay.cpp:142
    frame #13: 0x00007ffff59741d3 libWPEWebKit-1.0.so.3`WebCore::GLContext::createOffscreenContext(platformDisplay=&lt;unavailable&gt;) at GLContext.cpp:105:75
    frame #14: 0x00007ffff4852e92 libWPEWebKit-1.0.so.3`WebKit::WebKitProtocolHandler::handleGPU(this=&lt;unavailable&gt;, request=0x00005555557dada0) at WebKitProtocolHandler.cpp:366:22
    frame #15: 0x00007ffff4852b52 libWPEWebKit-1.0.so.3`WebKit::WebKitProtocolHandler::handleRequest(this=&lt;unavailable&gt;, request=0x00005555557dada0) at WebKitProtocolHandler.cpp:93:9
    frame #16: 0x00007ffff4868f31 libWPEWebKit-1.0.so.3`WebKitURISchemeHandler::platformStartTask(this=0x00007fffef6e3000, page=&lt;unavailable&gt;, task=0x00007fffef6ceb40) at WebKitWebContext.cpp:170:9
    frame #17: 0x00007ffff47fa8e9 libWPEWebKit-1.0.so.3`WebKit::WebURLSchemeHandler::startTask(this=0x00007fffef6e3000, page=0x00007fffaf2f3000, process=0x00007fffaf4fc340, webPageID=&lt;unavailable&gt;, parameters=0x00007fffffffcc70, completionHandler=0x00007fffffffc620)&gt;&amp;&amp;) at WebURLSchemeHandler.cpp:62:5
    frame #18: 0x00007ffff47c33b8 libWPEWebKit-1.0.so.3`WebKit::WebPageProxy::startURLSchemeTaskShared(this=&lt;unavailable&gt;, process=0x00007fffffffc658, webPageID=&lt;unavailable&gt;, parameters=&lt;unavailable&gt;) at WebPageProxy.cpp:9579:22
    frame #19: 0x00007ffff47c3234 libWPEWebKit-1.0.so.3`WebKit::WebPageProxy::startURLSchemeTask(this=&lt;unavailable&gt;, parameters=&lt;unavailable&gt;) at WebPageProxy.cpp:9570:5
    frame #20: 0x00007ffff45093d5 libWPEWebKit-1.0.so.3`WebKit::WebPageProxy::didReceiveMessage(IPC::Connection&amp;, IPC::Decoder&amp;) [inlined] void IPC::callMemberFunctionImpl&lt;WebKit::WebPageProxy, void (WebKit::WebPageProxy::*)(WebKit::URLSchemeTaskParameters&amp;&amp;), std::tuple&lt;WebKit::URLSchemeTaskParameters&gt;, 0ul&gt;(object=0x00007fffaf2f3000, function=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00, args=0x00007fffffffcc70)(WebKit::URLSchemeTaskParameters&amp;&amp;), std::tuple&lt;WebKit::URLSchemeTaskParameters&gt;&amp;&amp;, std::integer_sequence&lt;unsigned long, 0ul&gt;) at HandleMessage.h:43:5
    frame #21: 0x00007ffff45093c5 libWPEWebKit-1.0.so.3`WebKit::WebPageProxy::didReceiveMessage(IPC::Connection&amp;, IPC::Decoder&amp;) [inlined] void IPC::callMemberFunction&lt;WebKit::WebPageProxy, void (WebKit::WebPageProxy::*)(WebKit::URLSchemeTaskParameters&amp;&amp;), std::tuple&lt;WebKit::URLSchemeTaskParameters&gt;, std::integer_sequence&lt;unsigned long, 0ul&gt; &gt;(args=0x00007fffffffcc70, object=0x00007fffaf2f3000, function=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00)(WebKit::URLSchemeTaskParameters&amp;&amp;)) at HandleMessage.h:49
    frame #22: 0x00007ffff45093c5 libWPEWebKit-1.0.so.3`WebKit::WebPageProxy::didReceiveMessage(IPC::Connection&amp;, IPC::Decoder&amp;) [inlined] void IPC::handleMessage&lt;Messages::WebPageProxy::StartURLSchemeTask, WebKit::WebPageProxy, void (WebKit::WebPageProxy::*)(WebKit::URLSchemeTaskParameters&amp;&amp;)&gt;(decoder=0x00007fffef6d1480, object=0x00007fffaf2f3000, function=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00)(WebKit::URLSchemeTaskParameters&amp;&amp;)) at HandleMessage.h:121
    frame #23: 0x00007ffff4509397 libWPEWebKit-1.0.so.3`WebKit::WebPageProxy::didReceiveMessage(this=0x00007fffaf2f3000, connection=0x00007fffef6cd168, decoder=0x00007fffef6d1480) at WebPageProxyMessageReceiver.cpp:1602
    frame #24: 0x00007ffff47103a8 libWPEWebKit-1.0.so.3`IPC::MessageReceiverMap::dispatchMessage(this=&lt;unavailable&gt;, connection=0x00007fffef6cd168, decoder=0x00007fffef6d1480) at MessageReceiverMap.cpp:0
    frame #25: 0x00007ffff47f538a libWPEWebKit-1.0.so.3`non-virtual thunk to WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&amp;, IPC::Decoder&amp;) [inlined] WebKit::WebProcessProxy::didReceiveMessage(this=0x00007fffaf4fc340, connection=0x00007fffef6cd168, decoder=0x00007fffef6d1480) at WebProcessProxy.cpp:819:9
    frame #26: 0x00007ffff47f5382 libWPEWebKit-1.0.so.3`non-virtual thunk to WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&amp;, IPC::Decoder&amp;) at WebProcessProxy.cpp:0
    frame #27: 0x00007ffff470951e libWPEWebKit-1.0.so.3`IPC::Connection::dispatchMessage(this=&lt;unavailable&gt;, decoder=0x00007fffef6d1480) at Connection.cpp:1020:14
    frame #28: 0x00007ffff470981d libWPEWebKit-1.0.so.3`IPC::Connection::dispatchMessage(this=0x00007fffef6cd168, message=0x7fffef6d1480) at Connection.cpp:1065:9
    frame #29: 0x00007ffff4708bce libWPEWebKit-1.0.so.3`IPC::Connection::dispatchIncomingMessages(this=0x00007fffef6cd168) at Connection.cpp:1169:5
    frame #30: 0x00007ffff70fb3d0 libWPEWebKit-1.0.so.3`WTF::RunLoop::performWork() [inlined] WTF::Function&lt;void ()&gt;::operator(this=&lt;unavailable&gt;)() const at Function.h:83:35
    frame #31: 0x00007ffff70fb3c7 libWPEWebKit-1.0.so.3`WTF::RunLoop::performWork(this=0x00007fffef6f9000) at RunLoop.cpp:133
    frame #32: 0x00007ffff71593e6 libWPEWebKit-1.0.so.3`WTF::RunLoop::RunLoop()::$_1::__invoke(void*) [inlined] WTF::RunLoop::RunLoop(this=&lt;unavailable&gt;, userData=&lt;unavailable&gt;)::$_1::operator()(void*) const at RunLoopGLib.cpp:80:42
    frame #33: 0x00007ffff71593e1 libWPEWebKit-1.0.so.3`WTF::RunLoop::RunLoop(userData=0x00007fffef6f9000)::$_1::__invoke(void*) at RunLoopGLib.cpp:79
    frame #34: 0x00007ffff715885a libWPEWebKit-1.0.so.3`WTF::RunLoop::$_0::__invoke(_GSource*, int (*)(void*), void*) [inlined] WTF::RunLoop::$_0::operator(this=&lt;unavailable&gt;, source=0x0000555555589460, callback=(libWPEWebKit-1.0.so.3`WTF::RunLoop::RunLoop()::$_1::__invoke(void*) at RunLoopGLib.cpp:79), userData=0x00007fffef6f9000)(_GSource*, int (*)(void*), void*) const at RunLoopGLib.cpp:53:28
    frame #35: 0x00007ffff7158821 libWPEWebKit-1.0.so.3`WTF::RunLoop::$_0::__invoke(source=0x0000555555589460, callback=(libWPEWebKit-1.0.so.3`WTF::RunLoop::RunLoop()::$_1::__invoke(void*) at RunLoopGLib.cpp:79), userData=0x00007fffef6f9000)(void*), void*) at RunLoopGLib.cpp:45
    frame #36: 0x00007ffff3aaff30 libglib-2.0.so.0`g_main_context_dispatch + 352
    frame #37: 0x00007ffff3b03b59 libglib-2.0.so.0`___lldb_unnamed_symbol449$$libglib-2.0.so.0 + 521
    frame #38: 0x00007ffff3aad781 libglib-2.0.so.0`g_main_context_iteration + 49
    frame #39: 0x00007ffff3cba22e libgio-2.0.so.0`g_application_run + 462
    frame #40: 0x000055555555760c cog`main(argc=4, argv=0x00007fffffffd6f8) at cog.c:457:12
    frame #41: 0x00007ffff38b6b25 libc.so.6`__libc_start_main + 213
    frame #42: 0x000055555555765e cog`_start + 46
(lldb)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1748513</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-04-08 15:33:08 -0700</bug_when>
    <thetext>(In reply to Adrian Perez from comment #4)
&gt; Okay, an observation: The backtrace above is from the UIProcess, which
&gt; I am quite sure it is NOT expected to instantiate PlatformDisplayLibWPE.

Hm, I think that&apos;s only true for GTK port, where the PlatformDisplayLibWPE is created in WebProcess::platformInitializeWebProcess, and PlatformDisplay::createPlatformDisplay should never create a PlatformDisplayLibWPE.

But this is a WPE port bug. For WPE port, PlatformDisplay::createPlatformDisplay is always going to create a PlatformDisplayLibWPE, and PlatformDisplay::sharedDisplay is routinely used in the UI process.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1748521</commentid>
    <comment_count>7</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2021-04-08 15:45:10 -0700</bug_when>
    <thetext>So, loading webkit://gpu creates a GL context, which in turn lazily
creates a PlatformDisplayLibWPE singleton by means of a call to the 
PlatformDisplay::sharedDisplay() function.

The thing here is that PlatformDisplayLibWPE::initialize() never
gets called, so its m_backend point is never set to a non-NULL value.
OTOH, PlatformDisplay::initializeEGLDisplay() does get called, and
there is where the atexit() call is done.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1802023</commentid>
    <comment_count>8</comment_count>
      <attachid>440602</attachid>
    <who name="Claudio Saavedra">csaavedra</who>
    <bug_when>2021-10-08 07:08:14 -0700</bug_when>
    <thetext>Created attachment 440602
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1802060</commentid>
    <comment_count>9</comment_count>
      <attachid>440602</attachid>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2021-10-08 08:04:41 -0700</bug_when>
    <thetext>Comment on attachment 440602
Patch

rs=me :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1802063</commentid>
    <comment_count>10</comment_count>
    <who name="Claudio Saavedra">csaavedra</who>
    <bug_when>2021-10-08 08:08:36 -0700</bug_when>
    <thetext>Committed r283801 (242694@main): &lt;https://commits.webkit.org/242694@main&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>440602</attachid>
            <date>2021-10-08 07:08:14 -0700</date>
            <delta_ts>2021-10-08 07:30:27 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-224309-20211008170813.patch</filename>
            <type>text/plain</type>
            <size>2471</size>
            <attacher name="Claudio Saavedra">csaavedra</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjgzNzk0CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb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ogfTsKIAogfSAv
LyBuYW1lc3BhY2UgV2ViQ29yZQo=
</data>
<flag name="review"
          id="464598"
          type_id="1"
          status="+"
          setter="cgarcia"
    />
          </attachment>
      

    </bug>

</bugzilla>