<html>
    <head>
      <base href="https://bugs.webkit.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 - [CoordinatedGraphics] WebCoordinatedSurface::create should do null-check of the return value of ShareableBitmap::createShareable"
   href="https://bugs.webkit.org/show_bug.cgi?id=167631">167631</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[CoordinatedGraphics] WebCoordinatedSurface::create should do null-check of the return value of ShareableBitmap::createShareable
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>WebKit2
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>Hironori.Fujii&#64;sony.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>WebCoordinatedSurface::create does not do null-check of the return value of ShareableBitmap::createShareable.

WebCoordinatedSurface.cpp is used only in EFL port at the moment.

This causes a crash with following call stack in case of out of shared memory:

<span class="quote">&gt; Thread 1 &quot;WebKitWebProces&quot; received signal SIGSEGV, Segmentation fault.
&gt; 0x00007f5dca7311c0 in WebKit::ShareableBitmap::data() const () from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; (gdb) bt
&gt; #0  0x00007f5dca7311c0 in WebKit::ShareableBitmap::data() const () from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #1  0x00007f5dca991312 in WebKit::ShareableBitmap::createCairoSurface() () from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #2  0x00007f5dca991393 in WebKit::ShareableBitmap::createGraphicsContext() () from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #3  0x00007f5dca98b3e8 in WebKit::WebCoordinatedSurface::createGraphicsContext(WebCore::IntRect const&amp;) ()
&gt;    from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #4  0x00007f5dca98b469 in WebKit::WebCoordinatedSurface::paintToSurface(WebCore::IntRect const&amp;, WebCore::CoordinatedSurface::Client&amp;) ()
&gt;    from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #5  0x00007f5dca9eef98 in WebKit::UpdateAtlas::paintOnAvailableBuffer(WebCore::IntSize const&amp;, unsigned int&amp;, WebCore::IntPoint&amp;, WebCore::CoordinatedSurface::Client&amp;) () from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #6  0x00007f5dcb835ff3 in WebCore::Tile::updateBackBuffer() () from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #7  0x00007f5dcb4e2319 in WebCore::TiledBackingStore::updateTileBuffers() () from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #8  0x00007f5dcb4e3fad in WebCore::TiledBackingStore::createTiles(WebCore::IntRect const&amp;, WebCore::IntRect const&amp;) ()
&gt;    from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #9  0x00007f5dcb4e41ff in WebCore::TiledBackingStore::createTilesIfNeeded(WebCore::IntRect const&amp;, WebCore::IntRect const&amp;) ()
&gt;    from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #10 0x00007f5dcb4e0966 in WebCore::CoordinatedGraphicsLayer::updateContentBuffers() () from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #11 0x00007f5dcb4e09d3 in WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers() ()
&gt;    from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #12 0x00007f5dcb4e09fc in WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers() ()
&gt;    from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #13 0x00007f5dcb4e09fc in WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers() ()
&gt;    from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #14 0x00007f5dcb4e09fc in WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers() ()
&gt;    from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #15 0x00007f5dca9ea278 in WebKit::CompositingCoordinator::flushPendingLayerChanges() () from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #16 0x00007f5dca9e3764 in WebKit::AcceleratedDrawingArea::sendDidUpdateBackingStoreState() ()
&gt;    from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #17 0x00007f5dca9e3e3c in WebKit::AcceleratedDrawingArea::updateBackingStoreState(unsigned long, bool, float, WebCore::IntSize const&amp;, WebCore::IntSize const&amp;) ()
&gt;    from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #18 0x00007f5dcaa3b15e in WebKit::DrawingArea::didReceiveMessage(IPC::Connection&amp;, IPC::Decoder&amp;) ()
&gt;    from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #19 0x00007f5dca7202e9 in IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&amp;, IPC::Decoder&amp;) ()
&gt;    from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #20 0x00007f5dca866e76 in WebKit::WebProcess::didReceiveMessage(IPC::Connection&amp;, IPC::Decoder&amp;) ()
&gt;    from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #21 0x00007f5dca71da8b in IPC::Connection::dispatchMessage(std::unique_ptr&lt;IPC::Decoder, std::default_delete&lt;IPC::Decoder&gt; &gt;) ()
&gt;    from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #22 0x00007f5dca71e848 in IPC::Connection::dispatchOneMessage() () from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #23 0x00007f5dcb94d6d1 in WTF::RunLoop::performWork() () from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #24 0x00007f5dc852eb2e in _ecore_pipe_handler_call (p=p&#64;entry=0x1f26ac0, buf=0x2217be0 &quot;W^\&quot;\002&quot;, len=&lt;optimized out&gt;)
&gt;     at /home/fujii/work/webkit/ga/WebKitBuild/DependenciesEFL/Source/efl-1.18.4/src/lib/ecore/ecore_pipe.c:511
&gt; #25 0x00007f5dc852f1e9 in _ecore_pipe_read (data=0x1f26ac0, fd_handler=&lt;optimized out&gt;)
&gt;     at /home/fujii/work/webkit/ga/WebKitBuild/DependenciesEFL/Source/efl-1.18.4/src/lib/ecore/ecore_pipe.c:637
&gt; #26 0x00007f5dc852cb82 in _ecore_call_fd_cb (fd_handler=0x1f1cab0, data=&lt;optimized out&gt;, func=&lt;optimized out&gt;)
&gt;     at /home/fujii/work/webkit/ga/WebKitBuild/DependenciesEFL/Source/efl-1.18.4/src/lib/ecore/ecore_private.h:333
&gt; #27 _ecore_main_fd_handlers_call () at /home/fujii/work/webkit/ga/WebKitBuild/DependenciesEFL/Source/efl-1.18.4/src/lib/ecore/ecore_main.c:1974
&gt; #28 _ecore_main_loop_iterate_internal (once_only=once_only&#64;entry=0)
&gt;     at /home/fujii/work/webkit/ga/WebKitBuild/DependenciesEFL/Source/efl-1.18.4/src/lib/ecore/ecore_main.c:2339
&gt; #29 0x00007f5dc852cf67 in ecore_main_loop_begin () at /home/fujii/work/webkit/ga/WebKitBuild/DependenciesEFL/Source/efl-1.18.4/src/lib/ecore/ecore_main.c:1286
&gt; #30 0x00007f5dca9f08cd in int WebKit::ChildProcessMain&lt;WebKit::WebProcess, WebKit::WebProcessMain&gt;(int, char**) ()
&gt;    from /home/fujii/work/webkit/ga/WebKitBuild/Release/lib/libewebkit2.so.1
&gt; #31 0x00007f5dc931b830 in __libc_start_main (main=0x400760 &lt;main&gt;, argc=2, argv=0x7ffdd6abb108, init=&lt;optimized out&gt;, fini=&lt;optimized out&gt;, 
&gt;     rtld_fini=&lt;optimized out&gt;, stack_end=0x7ffdd6abb0f8) at ../csu/libc-start.c:291
&gt; #32 0x00000000004007b9 in _start ()</span ></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>