<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 - REGRESSION (185319): Reproducible crash in WebHistoryItem launching FluidApp"
href="https://bugs.webkit.org/show_bug.cgi?id=146494">146494</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>REGRESSION (185319): Reproducible crash in WebHistoryItem launching FluidApp
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>528+ (Nightly build)
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</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 Misc.
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>beidson@apple.com
</td>
</tr></table>
<p>
<div>
<pre>REGRESSION (185319): Reproducible crash in WebHistoryItem launching FluidApp
Steps to reproduce:
1 - Download FluidApp from <a href="http://fluidapp.com">http://fluidapp.com</a>
2 - Create an app from a website (I used webkit.org)
3 - Launch that WebApp
Crash:
1 0x1034112e0 WTFCrash
2 0x104dbe7d9 WTF::CrashOnOverflow::crash()
3 0x104dbe7a9 WTF::CrashOnOverflow::overflowed()
4 0x104dbf471 WTF::Vector<WTF::String, 0ul, WTF::CrashOnOverflow, 16ul>::at(unsigned long)
5 0x104e51edd WTF::Vector<WTF::String, 0ul, WTF::CrashOnOverflow, 16ul>::operator[](unsigned long)
6 0x104eb909b -[WebHistoryItem initFromDictionaryRepresentation:]
7 0x104eb0897 -[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]
8 0x104eb0a8c -[WebHistoryPrivate loadFromURL:collectDiscardedItemsInto:error:]
9 0x104eb17db -[WebHistory loadFromURL:error:]
10 0x100019c11 -[FUHistoryController setUpHistory]
11 0x1000198ca -[FUHistoryController init]
12 0x100019807 +[FUHistoryController instance]
13 0x10000e293 -[FUApplication finishLaunching]
14 0x7fff8b010a21 -[NSApplication run]
15 0x7fff8af8d354 NSApplicationMain
16 0x1000017c4 start
The code in question:
auto redirectURLsVector = std::make_unique<Vector<String>>();
for (NSUInteger i = 0; i < size; ++i) {
id redirectURL = [redirectURLs objectAtIndex:i];
if (![redirectURL isKindOfClass:[NSString class]])
continue;
(*redirectURLsVector)[i] = (NSString *)redirectURL;
}
We create a Vector of size 0 then immediately reference the first element.
That's obviously wrong.
In radar as rdar://problem/21598293</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>