Firefox coredumps on startup due to "attempt to create unaligned slice" (patch attached)
Categories
(Core :: XPCOM, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox66 | --- | fixed |
People
(Reporter: xftroxgpx, Assigned: xftroxgpx)
Details
Attachments
(1 file)
653 bytes,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3622.0 Safari/537.36
Steps to reproduce:
Compile Firefox with a rustc that was compiled with debug-assertions=true (in config.toml)
Actual results:
at startup, Firefox coredumps as seen here https://github.com/servo/servo/issues/22613
new stacktrace also here: https://github.com/servo/servo/issues/22613#issuecomment-454446259
Expected results:
no coredump!
The fix is adding an alignas(8)
like:
alignas(8) nsTArrayHeader sEmptyTArrayHeader = {0, 0, 0};
see this comment: https://github.com/servo/servo/issues/22613#issuecomment-454451641
patch still applicable to current tip:
changeset: 454058:e56cc5e7b57a
tag: tip
Many thanks to the people in that thread https://github.com/servo/servo/issues/22613
without which this solution couldn't've been found!
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
![]() |
||
Comment 2•4 years ago
|
||
Comment on attachment 9036861 [details] [diff] [review] unaligned_slice_fix.patch Review of attachment 9036861 [details] [diff] [review]: ----------------------------------------------------------------- This looks good. Emilio, can you take care of landing this, with a small explanatory comment for why we're using alignas here?
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/mozilla-inbound/rev/319fa2b1377f Ensure the empty array header has enough alignment to avoid creating unaligned pointers. r=froydnj
Comment 4•4 years ago
|
||
bugherder |
Description
•