Last Comment Bug 871555 - Alignment problems in websocket channel
: Alignment problems in websocket channel
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Networking: WebSockets (show other bugs)
: Trunk
: Sun NetBSD
: -- normal (vote)
: mozilla24
Assigned To: Martin Husemann
:
: Patrick McManus [:mcmanus]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-13 07:49 PDT by Martin Husemann
Modified: 2013-05-31 21:42 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Use memcpy and properly aligned temporary variables instead of pointer casts with unclear alignment (1.23 KB, patch)
2013-05-13 07:49 PDT, Martin Husemann
mcmanus: review+
Details | Diff | Splinter Review

Description Martin Husemann 2013-05-13 07:49:32 PDT
Created attachment 748823 [details] [diff] [review]
Use memcpy and properly aligned temporary variables instead of pointer casts with unclear alignment

There are a few dubious lhs pointer casts which may triger bus errors on alignment critical archtitectures. At least the last one (assignment of mask to the header) did actualy hit in testing on sparc64.

Attached patch fixes it by using temporary variables and memcpy.
Comment 2 Phil Ringnalda (:philor) 2013-05-31 21:42:11 PDT
https://hg.mozilla.org/mozilla-central/rev/4539a7706881

Note You need to log in before you can comment on or make changes to this bug.