<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@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mcatanzaro@igalia.com
</td>
</tr>
<tr>
<th>CC</th>
<td>bugs-noreply@webkitgtk.org
</td>
</tr></table>
<p>
<div>
<pre>Only two reports of this one. Web process crash in WebCore::TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded inside WTF::Vector<WebCore::FloatRect, 0ul, WTF::CrashOnOverflow, 16ul>::expandCapacity. It's crashing on overflow here:
if (newCapacity > std::numeric_limits<unsigned>::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<WebCore::FloatRect, 0ul, WTF::CrashOnOverflow, 16ul>::expandCapacity(unsigned long) (newCapacity=<optimized out>, this=0x7ffdaef91720) at /usr/src/debug/webkitgtk-2.12.4/Source/WTF/wtf/Vector.h:266
sizeToAllocate = <optimized out>
this = 0x7ffdaef91720
#2 0x00007fa363a91df6 in WTF::Vector<WebCore::FloatRect, 0ul, WTF::CrashOnOverflow, 16ul>::expandCapacity(unsigned long) (newCapacity=<optimized out>, this=0x7ffdaef91720) at /usr/src/debug/webkitgtk-2.12.4/Source/WTF/wtf/Vector.h:1094
this = 0x7ffdaef91720
#3 0x00007fa363a91df6 in WTF::Vector<WebCore::FloatRect, 0ul, WTF::CrashOnOverflow, 16ul>::expandCapacity(unsigned long) (this=0x7ffdaef91720, newMinCapacity=<optimized out>) at /usr/src/debug/webkitgtk-2.12.4/Source/WTF/wtf/Vector.h:955
#4 0x00007fa364a58100 in WebCore::TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded(WebCore::FloatSize const&, WebCore::IntSize const&, bool) (ptr=0x7ffdaef91740, newMinCapacity=<optimized out>, this=0x7ffdaef91720) at /usr/src/debug/webkitgtk-2.12.4/Source/WTF/wtf/Vector.h:962
index = <optimized out>
tileRect = {m_location = {m_x = 3690000, m_y = 26344000}, m_size = {m_width = 2000, m_height = 2000}}
x = <optimized out>
y = 26344000
scaledSize = {m_width = 33554432, m_height = 33554432}
tileRectsToAdd = {<WTF::VectorBuffer<WebCore::FloatRect, 0ul>> = {<WTF::VectorBufferBase<WebCore::FloatRect>> = {m_buffer = 0x7f9e69800000, m_capacity = 221001661, m_size = 221001661}, <No data fields>}, <No data fields>}
tileIndicesToRemove = {<WTF::VectorBuffer<int, 0ul>> = {<WTF::VectorBufferBase<int>> = {m_buffer = 0x0, m_capacity = 0, m_size = 0}, <No data fields>}, <No data fields>}
hasAlpha = <optimized out>
tileSize = @0x7ffdaef917d0: {m_width = 2000, m_height = 2000}
size = <optimized out>
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>