diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-05-12 20:44:02 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-12 20:44:02 -0500 |
commit | 47e4c48feb12e4189f11fd94631f0abea5827f91 (patch) | |
tree | c1e08c7b08e5f192fad46288270198f0ecf6030f /components/script/dom | |
parent | 642cd08f21727ee35dc3dace14d0c9ad5837f380 (diff) | |
parent | 593e89086fd1bd7a1cb9c496ad5837a3c7ba594e (diff) | |
download | servo-47e4c48feb12e4189f11fd94631f0abea5827f91.tar.gz servo-47e4c48feb12e4189f11fd94631f0abea5827f91.zip |
Auto merge of #16833 - MortimerGoro:layout_alignment, r=SimonSapin
Fix unsafe AtomicRefCell<T> transmutes in Layout component
<!-- Please describe your changes on the following line: -->
Fixes unsafe transmute between `AtomicRefCell<PersistentLayoutData>` and `AtomicRefCell<PartialPersistentLayoutData>` which have different memory alignment in 32 bit archs leading to SEGV crashes. See https://github.com/servo/servo/issues/16817 and https://github.com/servo/servo/pull/16816
mem::align_of values in 32 bit archs (e.g. Android):
```
PersistentLayoutData 8
PersistentLayoutData 4
AtomicRefCell<PersistentLayoutData> 8
AtomicRefCell<PartialPersistentLayoutData> 4
```
mem::align_of values in 64 bit archs
```
PersistentLayoutData 8
PersistentLayoutData 8
AtomicRefCell<PersistentLayoutData> 8
AtomicRefCell<PartialPersistentLayoutData> 8
```
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #16817 (github issue number if applicable).
<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16833)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom')
0 files changed, 0 insertions, 0 deletions