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

ICE caused by LLVM assertion: Assertion `S->getType()->isPtrOrPtrVectorTy() && "Invalid cast"' #24098

Closed
Valloric opened this issue Apr 5, 2015 · 3 comments
Labels
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) ❄️

Comments

@Valloric
Copy link
Contributor

Valloric commented Apr 5, 2015

I was updating some code to rust beta and have just hit this roadblock when trying to run tests:

rustc: /home/rustbuild/src/rust-buildbot/slave/beta-dist-rustc-linux/build/src/llvm/lib/IR/Constants.cpp:1622: static llvm::Constant* llvm::ConstantExpr::getPointerCast(llvm::Constant*, llvm::Type*): Assertion `S->getType()->isPtrOrPtrVectorTy() && "Invalid cast"' failed.
Aborted (core dumped)

Repro steps:

  1. Checkout this commit.
  2. Run ./test.sh from the top-level repo dir.

I tried minimizing the code by hand for a smaller test case, but failed.

Version: rustc 1.0.0-beta (9854143cb 2015-04-02) (built 2015-04-02)
OS: OS X Yosemite 10.10.2 (14C1514)

Seems related to: #19748, #19826

@emberian emberian 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 Apr 5, 2015
@sanxiyn
Copy link
Member

sanxiyn commented Jun 16, 2015

I failed to reproduce this (i.e. ./test.sh shows all tests pass), after applying Valloric/nailgun@1eaf332 which was necessary to compile. Does it still happen for you?

@Valloric
Copy link
Contributor Author

I haven't tried to repro this since, but the current nailgun codebase doesn't have this issue because I added workarounds. If you tried to repro with the exact nailgun and rustc commits listed, it would most likely repro, but that may not be relevant since rustc has moved on since then.

@apasel422
Copy link
Contributor

After checking out the commit given in the first post and updating generator/unescape.rs for feature gates and a removed function, this no longer ICEs.

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. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

4 participants