-
Bug
-
Resolution: Fixed
-
P3
-
8
-
None
-
b96
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8149323 | 8u101 | Hannes Wallnoefer | P3 | Resolved | Fixed | b01 |
JDK-8147626 | 8u92 | Hannes Wallnoefer | P3 | Resolved | Fixed | b04 |
JDK-8155508 | emb-8u101 | Hannes Wallnoefer | P3 | Resolved | Fixed | b01 |
The getInt(int) implementations in NumberArrayData and LongArrayData just casts the element value to int, which is not correct JS semantics. What we should do is call JSType.toInt32. This can be seen by running the following script:
x = [0xffffffff, 0.5] // second element makes this a double array
print(x[0] & -10)
y = 0xffffffff
print(y & -10)
Expected output:
-10
-10
Actual output:
2147483638
-10
x = [0xffffffff, 0.5] // second element makes this a double array
print(x[0] & -10)
y = 0xffffffff
print(y & -10)
Expected output:
-10
-10
Actual output:
2147483638
-10
- backported by
-
JDK-8147626 ArrayData.getInt implementations do not convert to int32
-
- Resolved
-
-
JDK-8149323 ArrayData.getInt implementations do not convert to int32
-
- Resolved
-
-
JDK-8155508 ArrayData.getInt implementations do not convert to int32
-
- Resolved
-