Skip to content

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

Description

@the8472

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-FFIArea: Foreign function interface (FFI)A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions