<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 - Inserting elements into arrays fails when array contains very large numbers"
href="https://bugs.webkit.org/show_bug.cgi?id=170264">170264</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Inserting elements into arrays fails when array contains very large numbers
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>Safari 10
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>macOS 10.12
</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>JavaScriptCore
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>calvinlough@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>The following code doesn't behave as expected on the latest version of Safari (10.1+) and on the WebKit nightly builds:
var arr = [0, 2147483648]; // NOTE: the second number is greater than a signed 32bit int
arr.shift(); // remove the first element so arr is [2147483648]
arr[1] = 1; // Safari fails to add the new element and the array is unchanged
On all other browsers and Safari 10.0, arr is [2147483648, 1]. On Safari 10.1 and newer, arr is [2147483648].
The above code works fine if the numbers in the array are less than 2147483648.</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>