-
-
Notifications
You must be signed in to change notification settings - Fork 893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Array#splice bug with large arrays in Safari 7 and 8 #295
Comments
Clarification: the example above isn't the one that fails in Opera, that's a different one: function spliceBrokenOpera() {
var n = 256,
a = [];
a[n] = 'a';
a.splice( n + 1, 0, 'b' );
return a[n] !== 'a';
} |
So, the Safari test is about brokenness with Reading the steps in https://es5.github.io/#x15.4.4.12, specifically 12:
So I've convinced myself that starting with an array of length 1e5, with index 30 set to some value, and then I'll test the Opera one similarly, while I figure out how the best way to fix this Safari bug. |
Interestingly enough, the test detected the bug with length 1e5, |
This is fixed in the latest version of JavaScriptCore in WebKit Nightly, and got fixed in V8 several years ago in Chromium. But the stable releases of Safari 7 and 8 still have this bug.
In the versions of JavaScriptCore with this bug, the index is 30 instead of 29.
We had to workaround this for the time being in wikimedia/VisualEditor@d468b00
@catrope wrote:
The text was updated successfully, but these errors were encountered: