<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 - [GTK] Crash in WebCore::TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded allocating too-large vector"
   href="https://bugs.webkit.org/show_bug.cgi?id=164925">164925</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[GTK] Crash in WebCore::TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded allocating too-large vector
          </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>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </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>WebKit Gtk
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>mcatanzaro&#64;igalia.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>bugs-noreply&#64;webkitgtk.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Only two reports of this one. Web process crash in WebCore::TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded inside WTF::Vector&lt;WebCore::FloatRect, 0ul, WTF::CrashOnOverflow, 16ul&gt;::expandCapacity. It's crashing on overflow here:

        if (newCapacity &gt; std::numeric_limits&lt;unsigned&gt;::max() / sizeof(T))
            CRASH();

Curiously, the function accepts a size_t newCapacity parameter, but the limit it's checking is for smaller unsigned int.

Long backtrace downstream. Short version:

Thread 1 (Thread 0x7fa365b88ac0 (LWP 25221)):
#0  0x00007fa36318a67c in WTFCrash() () at /usr/src/debug/webkitgtk-2.12.4/Source/WTF/wtf/Assertions.cpp:322
#1  0x00007fa363a91df6 in WTF::Vector&lt;WebCore::FloatRect, 0ul, WTF::CrashOnOverflow, 16ul&gt;::expandCapacity(unsigned long) (newCapacity=&lt;optimized out&gt;, this=0x7ffdaef91720) at /usr/src/debug/webkitgtk-2.12.4/Source/WTF/wtf/Vector.h:266
        sizeToAllocate = &lt;optimized out&gt;
        this = 0x7ffdaef91720
#2  0x00007fa363a91df6 in WTF::Vector&lt;WebCore::FloatRect, 0ul, WTF::CrashOnOverflow, 16ul&gt;::expandCapacity(unsigned long) (newCapacity=&lt;optimized out&gt;, this=0x7ffdaef91720) at /usr/src/debug/webkitgtk-2.12.4/Source/WTF/wtf/Vector.h:1094
        this = 0x7ffdaef91720
#3  0x00007fa363a91df6 in WTF::Vector&lt;WebCore::FloatRect, 0ul, WTF::CrashOnOverflow, 16ul&gt;::expandCapacity(unsigned long) (this=0x7ffdaef91720, newMinCapacity=&lt;optimized out&gt;) at /usr/src/debug/webkitgtk-2.12.4/Source/WTF/wtf/Vector.h:955
#4  0x00007fa364a58100 in WebCore::TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded(WebCore::FloatSize const&amp;, WebCore::IntSize const&amp;, bool) (ptr=0x7ffdaef91740, newMinCapacity=&lt;optimized out&gt;, this=0x7ffdaef91720) at /usr/src/debug/webkitgtk-2.12.4/Source/WTF/wtf/Vector.h:962
        index = &lt;optimized out&gt;
        tileRect = {m_location = {m_x = 3690000, m_y = 26344000}, m_size = {m_width = 2000, m_height = 2000}}
        x = &lt;optimized out&gt;
        y = 26344000
        scaledSize = {m_width = 33554432, m_height = 33554432}
        tileRectsToAdd = {&lt;WTF::VectorBuffer&lt;WebCore::FloatRect, 0ul&gt;&gt; = {&lt;WTF::VectorBufferBase&lt;WebCore::FloatRect&gt;&gt; = {m_buffer = 0x7f9e69800000, m_capacity = 221001661, m_size = 221001661}, &lt;No data fields&gt;}, &lt;No data fields&gt;}
        tileIndicesToRemove = {&lt;WTF::VectorBuffer&lt;int, 0ul&gt;&gt; = {&lt;WTF::VectorBufferBase&lt;int&gt;&gt; = {m_buffer = 0x0, m_capacity = 0, m_size = 0}, &lt;No data fields&gt;}, &lt;No data fields&gt;}
        hasAlpha = &lt;optimized out&gt;
        tileSize = &#64;0x7ffdaef917d0: {m_width = 2000, m_height = 2000}
        size = &lt;optimized out&gt;
        this = 0x7fa29e59e780</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>