Skip to content

work around a rustc bug #2708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 30, 2018
Merged

work around a rustc bug #2708

merged 1 commit into from
Apr 30, 2018

Conversation

Gankra
Copy link
Contributor

@Gankra Gankra commented Apr 30, 2018

rustc tries to expand enum tags to fill padding even if
the requested size is smaller. This causes any code
manipulating the enum's raw repr to produce buggy results,
as it will write garbage into the padding, corrupting
what rustc thinks is the tag. This is being fixed upstream,
but for now just work around it by making the tags the same
size rustc expects.

See rust-lang/rust#50098


This change is Reviewable

rustc tries to expand enum tags to fill padding even if
the requested size is smaller. This causes any code
manipulating the enum's raw repr to produce buggy results,
as it will write garbage into the padding, corrupting
what rustc thinks is the tag. This is being fixed upstream,
but for now just work around it by making the tags the same
size rustc expects.

See rust-lang/rust#50098
@Gankra
Copy link
Contributor Author

Gankra commented Apr 30, 2018

cc @eqrion and @RReverser, this is relevant to your interests.

@RReverser
Copy link

O_o Thanks for the ping!

@glennw
Copy link
Member

glennw commented Apr 30, 2018

@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit dc129ab has been approved by glennw

@bors-servo
Copy link
Contributor

⌛ Testing commit dc129ab with merge 576d58f...

bors-servo pushed a commit that referenced this pull request Apr 30, 2018
work around a rustc bug

rustc tries to expand enum tags to fill padding even if
the requested size is smaller. This causes any code
manipulating the enum's raw repr to produce buggy results,
as it will write garbage into the padding, corrupting
what rustc thinks is the tag. This is being fixed upstream,
but for now just work around it by making the tags the same
size rustc expects.

See rust-lang/rust#50098

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/2708)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - status-appveyor, status-taskcluster
Approved by: glennw
Pushing 576d58f to master...

@bors-servo bors-servo merged commit dc129ab into servo:master Apr 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants