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

LLVM abort on address of dereference of byte string literal #19748

Closed
sp3d opened this issue Dec 11, 2014 · 1 comment
Closed

LLVM abort on address of dereference of byte string literal #19748

sp3d opened this issue Dec 11, 2014 · 1 comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@sp3d
Copy link
Contributor

sp3d commented Dec 11, 2014

Compiling the program:

fn main() { &*b"foo"; }

gives the output:

rustc: /build/rust-git/src/rust/src/llvm/lib/IR/Constants.cpp:1992: static llvm::Constant* llvm::ConstantExpr::getGetElementPtr(llvm::Constant*, llvm::ArrayRef<llvm::Value*>, bool, llvm::Type*): Assertion `C->getType()->isPtrOrPtrVectorTy() && "Non-pointer type for constant GetElementPtr expression"' failed.

Issue #17233 seems as if it might be related, but it's not the same assertion failure.

@kmcallister kmcallister added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ labels Jan 17, 2015
@tamird
Copy link
Contributor

tamird commented Apr 21, 2015

No longer reproduces.

$ RUST_BACKTRACE=1 rustc - <<< 'fn main() { &*b"foo"; }'
$ echo $?
0

@alexcrichton alexcrichton added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Apr 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

5 participants