WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 197228
188792
Accessing negative index element of a TypedArray object should return undefined
https://bugs.webkit.org/show_bug.cgi?id=188792
Summary
Accessing negative index element of a TypedArray object should return undefined
sunlili
Reported
2018-08-21 06:03:07 PDT
Executing following code : ----------------------------------------------- var arr = new Float64Array(100); function foo() { for (var k = 0; k > -10; k--) { arr[k] %= 5.1 * k } } function bar() { for (var k = 0; k > -10; k--) { print(arr[k]); } } foo(); bar(); print("BT_FLAG"); ------------------------------------------------ The output should be: NaN undefined undefined undefined undefined undefined undefined undefined undefined undefined BT_FLAG However, output of JavaScriptCore is : NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN BT_FLAG BT_GROUP 2018/8/21
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Shvayka
Comment 1
2020-06-07 07:17:13 PDT
r244950
fixed TypedArray internal methods with non-canonical numeric keys, including negative indices. test262 coverage:
https://test262.report/browse/built-ins/TypedArrayConstructors/internals/Set/key-is-out-of-bounds.js
. *** This bug has been marked as a duplicate of
bug 197228
***
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