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

UI test issue-64655-extern-rust-must-allow-unwind.rs#thin0 triggers LLVM assert when compiled for i586 target with CGUs = 1 #83854

Closed
the8472 opened this issue Apr 4, 2021 · 0 comments · Fixed by #87610
Labels
A-FFI Area: Foreign function interface (FFI) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

Comments

@the8472
Copy link
Member

the8472 commented Apr 4, 2021

This was discovered in #81942 (comment) which lowers the UI test default CGU count to 1. The test was modified to explicitly request 2CGUs to make it pass, but the underlying issue remains.

A similar errors but affecting different test-cases was also encountered in #81825 (comment)

Steps to reproduce

  • checkout aef1140 (master may work too)
  • add -Ccodegen-units=1 to issue-64655-extern-rust-must-allow-unwind.rs#thin0
  • modify src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile to only run UI tests
  • run ./src/ci/docker/run.sh dist-i586-gnu-i586-i686-musl

Output

failures:

---- [ui] ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#thin0 stdout ----

error in revision `thin0`: test compilation failed although it shouldn't!
status: signal: 6 (core dumped)
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" "/checkout/src/test/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs" "-Zthreads=1" "--target=i586-unknown-linux-gnu" "--cfg" "thin0" "--error-format" "json" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zemit-future-incompat-report" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/extern/issue-64655-extern-rust-must-allow-unwind.thin0/a" "-Crpath" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/i586-unknown-linux-gnu/native/rust-test-helpers" "-Clinker=cc" "-C" "opt-level=0" "-C" "lto=thin" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/extern/issue-64655-extern-rust-must-allow-unwind.thin0/auxiliary"
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
rustc: /checkout/src/llvm-project/llvm/lib/CodeGen/RegAllocFast.cpp:883: void {anonymous}::RegAllocFast::defineVirtReg(llvm::MachineInstr&, unsigned int, llvm::Register, bool): Assertion `PhysReg != 0 && "Register not assigned"' failed.

------------------------------------------



failures:
    [ui] ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#thin0

Additionally ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs#thin fails with 1 CGU under the i686-gnu-nopt runner.

@jonas-schievink jonas-schievink added A-FFI Area: Foreign function interface (FFI) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. labels Apr 4, 2021
@nagisa nagisa added the I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics. label Apr 6, 2021
bors added a commit to rust-lang-ci/rust that referenced this issue Jul 31, 2021
Bump LLVM for RegAllocFast bugfix

Fixes rust-lang#83854

cc `@cuviper`
@bors bors closed this as completed in 4677efd Jul 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-FFI Area: Foreign function interface (FFI) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants