[Webkit-unassigned] [Bug 188792] New: Accessing negative index element of a TypedArray object should return undefined

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 21 06:03:07 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=188792

            Bug ID: 188792
           Summary: Accessing negative index element of a TypedArray
                    object should return undefined
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: sunlili at ict.ac.cn

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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180821/5a9d7080/attachment.html>


More information about the webkit-unassigned mailing list