NEW185495
ArraySpeciesCreate not checking for max length on array like objects
https://bugs.webkit.org/show_bug.cgi?id=185495
Summary ArraySpeciesCreate not checking for max length on array like objects
Leo Balter
Reported 2018-05-09 16:11:19 PDT
I got a false positive from the test runner while working on Bug 185476. While the fix there is still fine, it doesn't solve the whole problem where a RangeError is not observed for non-array objects with the length property set to values > 2**32-1. `constructArrayWithSizeQuirk` in the Source/JavaScriptCore/runtime/ArrayConstructor.cpp file has a check for the length - code below - but I was unable to reach it. My first patch was calling it but it's still not successful. ``` uint32_t n = length.toUInt32(exec); if (n != length.toNumber(exec)) return throwException(exec, scope, createRangeError(exec, ASCIILiteral("Array size is not a small enough positive integer."))); ``` Yusuke, would you help me here, please?
Attachments
Note You need to log in before you can comment on or make changes to this bug.