Skip to content

ir: Fix wrong condition in bitfield alignment. #1326

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

Closed
wants to merge 2 commits into from

Conversation

emilio
Copy link
Contributor

@emilio emilio commented Jun 3, 2018

We should also align the allocation unit even if it's the first bitfield in the
allocation unit.

Fixes #1314

We should also align the allocation unit even if it's the first bitfield in the
allocation unit.

Fixes rust-lang#1314
@highfive
Copy link

highfive commented Jun 3, 2018

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

@emilio
Copy link
Contributor Author

emilio commented Jun 3, 2018

r? @fitzgen

@emilio
Copy link
Contributor Author

emilio commented Jun 3, 2018

This is not quite right (fixes the layout, but we still look at the wrong offset)...

@emilio
Copy link
Contributor Author

emilio commented Jun 3, 2018

Oh, we look at the wrong offset in the other test-case...

@fitzgen
Copy link
Member

fitzgen commented Jun 4, 2018

Is this ready for review? It isn't clear to me and CI is failing.

@emilio
Copy link
Contributor Author

emilio commented Jun 4, 2018

I need to decide which of the two cases I break, or move all our layout tracking to the time before we compute bitfields... :(

@emilio
Copy link
Contributor Author

emilio commented Aug 31, 2019

Closing for inactivity, fixing this properly is pretty hard too (and I don't have time to work on it atm).

@emilio emilio closed this Aug 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bindgen fail to generate bindings for struct.
3 participants