Closed
Bug 544512
Opened 16 years ago
Closed 15 years ago
Misaligned accesses in uconv causes Bus Error on sparc and word wrapping on arm
Categories
(Core :: Internationalization, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a3
People
(Reporter: glandium, Assigned: glandium)
Details
Attachments
(1 file, 1 obsolete file)
1.42 KB,
patch
|
smontagu
:
review+
|
Details | Diff | Splinter Review |
There are 2 places where misaligned accesses can happen and lead to bus errors on sparc. The attached patch addresses both issues. I think the same applies to trunk.
With the patch and the one in bug 448658, xpcshell-tests and make check pass on a xulrunner build (i.e. the few tests that live in browser/ are not run) on sparc.
Assignee | ||
Updated•16 years ago
|
Attachment #425486 -
Attachment is patch: true
Attachment #425486 -
Attachment mime type: application/octet-stream → text/plain
Attachment #425486 -
Flags: review?(smontagu)
Updated•16 years ago
|
Attachment #425486 -
Flags: review?(smontagu) → review+
Updated•15 years ago
|
Assignee | ||
Comment 1•15 years ago
|
||
This is also a problem on ARM, because it wraps at word boundary. On a 16-bit word, that inverts endianness, and on 32-bit words, this can have very unpleasant side effects. These problems are detected by the current test suite, so they don't need new tests, but an additional fix is obviously necessary.
Also note there could be problems when reading the BOM a few lines above, but as this is supposed to happen only at the beginning of the buffer, and I expect the buffer to be sufficiently aligned, it shouldn't be a problem. Or are there places feeding an unaligned buffer to convert ?
Attachment #425486 -
Attachment is obsolete: true
Status: ASSIGNED → NEW
Attachment #426807 -
Flags: review?(smontagu)
Updated•15 years ago
|
Status: NEW → ASSIGNED
Keywords: checkin-needed
Assignee | ||
Updated•15 years ago
|
Summary: Bus error on sparc due to misaligned accesses in uconv → Misaligned accesses in uconv causes Bus Error on sparc and word wrapping on arm
Updated•15 years ago
|
Attachment #426807 -
Flags: review?(smontagu) → review+
Comment 2•15 years ago
|
||
(In reply to comment #1)
> Also note there could be problems when reading the BOM a few lines above, but
> as this is supposed to happen only at the beginning of the buffer, and I expect
> the buffer to be sufficiently aligned, it shouldn't be a problem. Or are there
> places feeding an unaligned buffer to convert ?
Not as far as I know.
Updated•15 years ago
|
Keywords: checkin-needed
Comment 3•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a3
You need to log in
before you can comment on or make changes to this bug.
Description
•