WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 163417
185625
Array#indexOf not finding items in array like objects with .length >= 2 ** 32
https://bugs.webkit.org/show_bug.cgi?id=185625
Summary
Array#indexOf not finding items in array like objects with .length >= 2 ** 32
Leo Balter
Reported
2018-05-14 14:25:10 PDT
This predates to ES5.1 where the Array were bound to a max length of 2 ** 32. See
https://es5.github.io/#x15.4.4.14
Test262: test/built-ins/Array/prototype/indexOf/15.4.4.14-3-28.js test/built-ins/Array/prototype/indexOf/15.4.4.14-3-29.js Example: ``` var targetObj = {}; var obj = { 0: 42, length: 2 ** 32 - 1 }; [].indexOf.call(obj, 42); // 0 obj.length = 2 ** 32 [].indexOf.call(obj, 42); // -1 ```
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Shvayka
Comment 1
2020-04-03 09:46:29 PDT
Thank you for detailed report, Leo. Apart from Array.prototype.indexOf, other Array methods (mostly ones that are implemented in C++) are affected. I am merging bug reports to fix all (observable) cases with a single patch. *** This bug has been marked as a duplicate of
bug 163417
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug