Closed Bug 644569 Opened 13 years ago Closed 13 years ago

SIGBUS on various things using @font-face on sparc

Categories

(Core :: Graphics, defect)

Sun
All
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 643137

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(1 file)

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.
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)
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.
Hmm, this was also filed as bug 643137, apparently.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
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.

Attachment

General

Created:
Updated:
Size: