You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to ES10.0,TypedArray(length) uses method ToIndex to avoid negative length. So the length of the array can not be negative. But when the parameter of Float64Array is -268435457 or smaller, the length of array is changed into a negative number. And other TypedArray constructors also have similar situation. Rhino achieves TypedArray(length) but doesn't handle negative length properly. This may be an issue of TypedArray constructors' parameter judgment.
According to ES10.0,
TypedArray(length)
uses methodToIndex
to avoid negative length. So thelength
of thearray
can not be negative. But when the parameter ofFloat64Array
is -268435457 or smaller, thelength
ofarray
is changed into a negative number. And otherTypedArray
constructors also have similar situation. Rhino achievesTypedArray(length)
but doesn't handle negative length properly. This may be an issue ofTypedArray
constructors' parameter judgment.version
1.7.12
command
java -jar rhino/rhino-1.7.12.jar -debug -version 200 testcase.js
testcase
output
expected output
Contributor:@YuanWangC
The text was updated successfully, but these errors were encountered: