Skip to content

Conversation

@pnkfelix
Copy link
Contributor

Add precondition to Layout that the align not exceed 2^31.

This precondition takes the form of a behavorial change in Layout::from_size_align (so it returns None if the input align is too large) and a new requirement for safe usage of Layout::from_size_align_unchecked.

Fix #30170.

This precondition takes the form of a behavorial change in
`Layout::from_size_align` (so it returns `None` if the `align` is too
large) and a new requirement for safe usage of
`Layout::from_size_align_unchecked`.

Fix rust-lang#30170.
@pnkfelix
Copy link
Contributor Author

cc #32838

@pnkfelix pnkfelix added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 13, 2017
@carols10cents
Copy link
Member

r? @alexcrichton

@alexcrichton
Copy link
Member

@bors: r+

Thanks @pnkfelix!

@arielb1 arielb1 added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 18, 2017
@arielb1
Copy link
Contributor

arielb1 commented Jul 18, 2017

@bors r=alexcrichton

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Collaborator

bors commented Jul 27, 2017

📌 Commit ef8804b has been approved by alexcrichton

@bors
Copy link
Collaborator

bors commented Jul 28, 2017

⌛ Testing commit ef8804b with merge 63b3a03...

bors added a commit that referenced this pull request Jul 28, 2017
…xcrichton

Add precondition to `Layout` that the `align` fit in a u32.

Add precondition to `Layout` that the `align` not exceed 2^31.

This precondition takes the form of a behavorial change in `Layout::from_size_align` (so it returns `None` if the input `align` is too large) and a new requirement for safe usage of `Layout::from_size_align_unchecked`.

Fix #30170.
@bors
Copy link
Collaborator

bors commented Jul 28, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 63b3a03 to master...

@bors bors merged commit ef8804b into rust-lang:master Jul 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants