SIGBUS on various things using @font-face on sparc

RESOLVED DUPLICATE of bug 643137

Status

()

Core
Graphics
RESOLVED DUPLICATE of bug 643137
7 years ago
7 years ago

People

(Reporter: glandium, Assigned: glandium)

Tracking

Trunk
Sun
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

7 years ago
Program received signal SIGBUS, Bus error.
ots::OTSStream::Write (this=0xff8c7068, data=0x753ed400, length=254) at ../../../dist/include/ots/opentype-sanitiser.h:68
warning: Source file is more recent than executable.
68                reinterpret_cast<const uint8_t*>(data) + offset));

This is due to a misaligned 32-bits access. I would have expected it to create problems on arm as well, but apparently, it doesn't appear to be a problem on Android.

I noticed this on 3.5, but the ots code hasn't changed in the meanwhile so I don't expect anything to have changed since then. 4.0 doesn't even start yet on sparc, so I can't check, and I don't have 3.6 builds for sparc.
(Assignee)

Comment 1

7 years ago
Created attachment 521500 [details] [diff] [review]
Avoid misaligned 32-bit read in opentype-sanitiser

It looks like this is the only place where this matters. (At least now, all crashtests passes)
Assignee: nobody → mh+mozilla
Attachment #521500 - Flags: review?(roc)
(Assignee)

Comment 2

7 years ago
Please note that this doesn't change the generated assembly on x86 and x86-64 with gcc.
Looks like this was also reported in bug 631636. I notice that the suggested patch there addresses two places in the code, not just one. But the first instance (at line 66) looks to me like it shouldn't be necessary, unless the compiler does something _really_ bizarre with struct member alignment.
Duplicate of this bug: 631636
Hmm, this was also filed as bug 643137, apparently.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 643137
(Assignee)

Comment 6

7 years ago
Comment on attachment 521500 [details] [diff] [review]
Avoid misaligned 32-bit read in opentype-sanitiser

Clearing review flag
Attachment #521500 - Flags: review?(roc)
You need to log in before you can comment on or make changes to this bug.