Skip to content
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

Refactor ptr_offset_inbounds #1031

Merged
merged 6 commits into from
Nov 6, 2019
Merged

Refactor ptr_offset_inbounds #1031

merged 6 commits into from
Nov 6, 2019

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Nov 4, 2019

I finally found a way to write this using basically just check_ptr_access while handling all cases (integers and pointers, offset 0 or not) correctly. This changes behavior for NULL ptrs, but I think the change is for the better.

Depends on rust-lang/rust#66081.

@RalfJung RalfJung added the S-blocked-on-rust Status: Blocked on landing a Rust PR label Nov 4, 2019
Centril added a commit to Centril/rust that referenced this pull request Nov 5, 2019
let caller of check_ptr_access_align control the error message

This is needed for rust-lang/miri#1031
Centril added a commit to Centril/rust that referenced this pull request Nov 6, 2019
let caller of check_ptr_access_align control the error message

This is needed for rust-lang/miri#1031
@RalfJung
Copy link
Member Author

RalfJung commented Nov 6, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Nov 6, 2019

📌 Commit b2a2f4d has been approved by RalfJung

@bors
Copy link
Contributor

bors commented Nov 6, 2019

⌛ Testing commit b2a2f4d with merge e97c868...

bors added a commit that referenced this pull request Nov 6, 2019
Refactor ptr_offset_inbounds

I finally found a way to write this using basically just `check_ptr_access` while handling all cases (integers and pointers, offset 0 or not) correctly. This changes behavior for NULL ptrs, but I think the change is for the better.

Depends on rust-lang/rust#66081.
@bors
Copy link
Contributor

bors commented Nov 6, 2019

💔 Test failed - status-appveyor

@RalfJung
Copy link
Member Author

RalfJung commented Nov 6, 2019

Ah, I forgot about negative offsets.

@bors r+

@bors
Copy link
Contributor

bors commented Nov 6, 2019

📌 Commit 8b0c14f has been approved by RalfJung

@bors
Copy link
Contributor

bors commented Nov 6, 2019

⌛ Testing commit 8b0c14f with merge 4ddc37d...

bors added a commit that referenced this pull request Nov 6, 2019
Refactor ptr_offset_inbounds

I finally found a way to write this using basically just `check_ptr_access` while handling all cases (integers and pointers, offset 0 or not) correctly. This changes behavior for NULL ptrs, but I think the change is for the better.

Depends on rust-lang/rust#66081.
@bors
Copy link
Contributor

bors commented Nov 6, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: RalfJung
Pushing 4ddc37d to master...

@bors bors merged commit 8b0c14f into rust-lang:master Nov 6, 2019
@RalfJung RalfJung deleted the ptr-offset branch November 6, 2019 11:10
@RalfJung RalfJung removed the S-blocked-on-rust Status: Blocked on landing a Rust PR label Dec 15, 2019
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.

2 participants