Closed
Bug 1543659
Opened 6 years ago
Closed 6 years ago
TypedArray broken on 64-bit big endian
Categories
(Core :: JavaScript Engine, defect, P5)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: jcristau, Unassigned)
References
Details
Attachments
(1 obsolete file)
The JSPropertySpec::ValueWrapper struct contains a union with a pointer and a int32. When writing an int through JS_INT32_PS → INT32VALUE_WRAPPER we actually cast the int32 to a pointer and write to the pointer slot.
Then when we read it back through the int32 member, we end up getting the high-order 32 bits of the pointer, which are 0.
This breaks at least TypedArrays' BYTES_PER_ELEMENT property.
Reporter | ||
Comment 1•6 years ago
|
||
Add some padding to make the union's int32 member correspond to the
low-order bits of the string member. This fixes TypedArray tests on
platforms such as s390x, ppc64 and sparc64.
Reporter | ||
Comment 2•6 years ago
|
||
Looks like this code comes from bug 1015798.
Reporter | ||
Comment 3•6 years ago
|
||
Bug 1543843 fixes this.
Assignee: jcristau → nobody
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
Updated•6 years ago
|
Attachment #9057639 -
Attachment is obsolete: true
You need to log in
before you can comment on or make changes to this bug.
Description
•