chakra-core / chakra-core/ChakraCore

JIT did not handle array length correctly

Open
#6,882 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
9.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

###### Version

chakra-1.11.24.0, 1.13.0.0-beta

###### Test case

```js
function foo() {
var IntArr2 = new Int32Array();
IntArr2.__defineGetter__("length", function () {
return 1;
});
IntArr2[5] = 429496725;
IntArr2[IntArr2.length] = 3;
return [IntArr2,IntArr2.length]
}
for(let i = 0;i<100000;i++) foo()
print(foo())

```

###### Execution steps

.ch Testcase.js

###### Output
```
,0
```

###### Expected result
,1

###### Description

The correct output of the test case should be `,1` while chakra yields `,0` . This may be caused by the incorrect implementation of chakra JIT compiler.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.