Skip to content

Fix LLVM assertion on out-of-bounds const slice index. #28841

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
Oct 7, 2015

Conversation

jld
Copy link
Contributor

@jld jld commented Oct 5, 2015

This turned up as part of #3170. When constructing an undef value to
return in the error case, we were trying to get the element type of the
Rust-level value being indexed instead of the underlying array; when
indexing a slice, that's not an array and the LLVM assertion failure
reflects this.

The regression test is a lightly altered copy of const-array-oob.rs.

This turned up as part of rust-lang#3170.  When constructing an `undef` value to
return in the error case, we were trying to get the element type of the
Rust-level value being indexed instead of the underlying array; when
indexing a slice, that's not an array and the LLVM assertion failure
reflects this.

The regression test is a lightly altered copy of `const-array-oob.rs`.
@rust-highfive
Copy link
Contributor

r? @nrc

(rust_highfive has picked a reviewer for you, use r? to override)

@Aatch
Copy link
Contributor

Aatch commented Oct 5, 2015

@bors +r fd07780

@Manishearth
Copy link
Member

@bors r=Aatch fd07780

@bors
Copy link
Collaborator

bors commented Oct 7, 2015

⌛ Testing commit fd07780 with merge 463d824...

Manishearth added a commit to Manishearth/rust that referenced this pull request Oct 7, 2015
This turned up as part of rust-lang#3170.  When constructing an `undef` value to
return in the error case, we were trying to get the element type of the
Rust-level value being indexed instead of the underlying array; when
indexing a slice, that's not an array and the LLVM assertion failure
reflects this.

The regression test is a lightly altered copy of `const-array-oob.rs`.
@bors
Copy link
Collaborator

bors commented Oct 7, 2015

⛄ The build was interrupted to prioritize another pull request.

@bors
Copy link
Collaborator

bors commented Oct 7, 2015

⌛ Testing commit fd07780 with merge 28e2f5d...

@bors
Copy link
Collaborator

bors commented Oct 7, 2015

⛄ The build was interrupted to prioritize another pull request.

@bors
Copy link
Collaborator

bors commented Oct 7, 2015

⌛ Testing commit fd07780 with merge b2cc47f...

bors added a commit that referenced this pull request Oct 7, 2015
This turned up as part of #3170.  When constructing an `undef` value to
return in the error case, we were trying to get the element type of the
Rust-level value being indexed instead of the underlying array; when
indexing a slice, that's not an array and the LLVM assertion failure
reflects this.

The regression test is a lightly altered copy of `const-array-oob.rs`.
@bors bors merged commit fd07780 into rust-lang:master Oct 7, 2015
@bors bors mentioned this pull request Oct 7, 2015
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.

6 participants