chakra-core / chakra-core/ChakraCore
Seems to be JIT optimization problem
- 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 1
```js
var a;
for(let b = 30000;b>-1;b--){
a = b * -1
a += a ;
}
print(Object.is(a, 0));
print(Object.is(a, -0));
```
###### Execution steps 1
.ch Testcase.js
###### Output 1
```
true
false
```
###### Expected result 1
```
false
true
```
###### Test case 2
```js
var a;
for(let b = 30;b>-1;b--){
a = b * -1
a += a ;
}
print(Object.is(a, 0));
print(Object.is(a, -0));
```
###### Execution steps 2
.ch Testcase.js
###### Output 2
```
false
true
```
###### Expected result 1
```
false
true
```
###### Description
When the number of cycles increases, chakra outputs the wrong result.It seems to be caused by incorrect JIT optimization.
Contributor guide
Assessment
This issue has not been assessed yet.