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 UNREACHABLE for x86_64-unknown-linux-gnux32 target #45417

Closed
malbarbo opened this issue Oct 20, 2017 · 2 comments
Closed

llvm UNREACHABLE for x86_64-unknown-linux-gnux32 target #45417

malbarbo opened this issue Oct 20, 2017 · 2 comments
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. O-linux Operating system: Linux O-x32 x32 ABI T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@malbarbo
Copy link
Contributor

> rustc --version --verbose
rustc 1.22.0-nightly (4750c1ec0 2017-10-19)
binary: rustc
commit-hash: 4750c1ec047f18bc0e33823182e09711a3826fb5
commit-date: 2017-10-19
host: x86_64-unknown-linux-gnu
release: 1.22.0-nightly
LLVM version: 4.0

Trying

echo "fn main() { println!() }" | rustc --target x86_64-unknown-linux-gnux32 -

rustc is aborted with the error

Cannot emit physreg copy instruction
UNREACHABLE executed at /checkout/src/llvm/lib/Target/X86/X86InstrInfo.cpp:5778!

Which also appears in #45416 and #37976.

Using the docker image to build #45391 I got the same errors, but using a rustc built without the docker container (using debian9) I can build many programs - but running the programs generates a SIGBUS or SIGTRAP, which seems to indicate stack problems (as suggested by @alexcrichton). Note that inside docker many tests are build and run fine!

@TimNN TimNN added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. O-linux Operating system: Linux labels Oct 22, 2017
@malbarbo
Copy link
Contributor Author

Passing -O fix the problem

echo "fn main() { println!() }" | rustc -O --target x86_64-unknown-linux-gnux32 -

@jonas-schievink jonas-schievink added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Feb 16, 2019
@sanxiyn sanxiyn added the O-x86_64 Target: x86-64 processors (like x86_64-*) label Mar 6, 2019
@tormol
Copy link
Contributor

tormol commented Mar 15, 2019

I cannot reproduce this with Rust 1.33.0 and LLVM 8.0

However I've run into other issues with println! on x86_64-unknown-linux-gnux32 that also only happen in debug-mode, but they happen at run-time and felt different enough that I've opened a new issue: #59220

@sanxiyn sanxiyn added O-x32 x32 ABI and removed O-x86_64 Target: x86-64 processors (like x86_64-*) labels Mar 18, 2019
@malbarbo malbarbo closed this as completed Aug 1, 2019
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. C-bug Category: This is a bug. O-linux Operating system: Linux O-x32 x32 ABI T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants