<?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>164925</bug_id>
          
          <creation_ts>2016-11-18 08:18:04 -0800</creation_ts>
          <short_desc>[GTK] Crash in WebCore::TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded allocating too-large vector</short_desc>
          <delta_ts>2016-11-30 05:53:50 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugzilla.redhat.com/show_bug.cgi?id=1372908</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="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1252676</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-11-18 08:18:04 -0800</bug_when>
    <thetext>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&apos;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&apos;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 = @0x7ffdaef917d0: {m_width = 2000, m_height = 2000}
        size = &lt;optimized out&gt;
        this = 0x7fa29e59e780</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1254748</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2016-11-30 05:53:50 -0800</bug_when>
    <thetext>We don&apos;t even use TextureMapperTiledBackingStore anymore since 2.14. Well only when building without coord graphics.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>