Skip to content

tests/run-make/repr128-dwarf panics when LLVM assertions are enabled #138254

Closed
@ehuss

Description

@ehuss

The following steps illustrate the tests/run-make/repr128-dwarf test failing (running on x86_64-unknown-linux-gnu):

git clone https://github.com/rust-lang/rust.git
cd rust
cat <<EOF > config.toml
profile = 'dist'
[llvm]
download-ci-llvm = 'if-unchanged'
assertions = true

[build]
optimized-compiler-builtins = true
cargo-native-static = true

[rust]
download-rustc = 'if-unchanged'
codegen-units-std = 1
channel = 'nightly'
verbose-tests = true
codegen-backends = ['llvm', 'cranelift']
lld = true
verify-llvm-ir = true
EOF
./x test tests/run-make/repr128-dwarf/rmake.rs

This fails with the following:

test [run-make] tests/run-make/repr128-dwarf ... FAILED

failures:

---- [run-make] tests/run-make/repr128-dwarf stdout ----

error: rmake recipe failed to complete
status: exit status: 101
command: cd "/home/eric/Temp/rust/build/x86_64-unknown-linux-gnu/test/run-make/repr128-dwarf/rmake_out" && env -u RUSTFLAGS AR="ar" BUILD_ROOT="/home/eric/Temp/rust/build/x86_64-unknow
n-linux-gnu" CARGO="/home/eric/Temp/rust/build/x86_64-unknown-linux-gnu/stage2-tools-bin/cargo" CC="cc" CC_DEFAULT_FLAGS="-ffunction-sections -fdata-sections -fPIC -m64" CXX="c++" CXX_
DEFAULT_FLAGS="-ffunction-sections -fdata-sections -fPIC -m64" HOST_RUSTC_DYLIB_PATH="/home/eric/Temp/rust/build/x86_64-unknown-linux-gnu/stage2/lib" LD_LIBRARY_PATH="/home/eric/Temp/r
ust/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/home/eric/Temp/rust/build/x86_64-unknown-linux-gnu/stage0/lib:/home/eric/Temp/rust/buil
d/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib" LD_LIB_PATH_ENVVAR="LD_LIBRARY_PATH" LLVM_BIN_DIR="/home/eric/Temp/rust/build/x86_64-unknown-linux-gnu/ci-ll
vm/bin" LLVM_COMPONENTS="aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets amdgpu amdgpuasmparser a
mdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgputargetmca amdgpuutils analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr
 avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard cgdata cod
egen codegentypes core coroutines coverage csky cskyasmparser cskycodegen cskydesc cskydisassembler cskyinfo debuginfobtf debuginfocodeview debuginfodwarf debuginfogsym debuginfologica
lview debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker dwarflinkerclassic dwarflinkerparallel dwp engine executionengine extensions filecheck frontendatomic frontenddriver
frontendhlsl frontendoffloading frontendopenacc frontendopenmp fuzzercli fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo hipst
dpar instcombine instrumentation interfacestub interpreter ipo irprinter irreader jitlink libdriver lineeditor linker loongarch loongarchasmparser loongarchcodegen loongarchdesc loonga
rchdisassembler loongarchinfo lto m68k m68kasmparser m68kcodegen m68kdesc m68kdisassembler m68kinfo mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdis
assembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts objco
py object objectyaml option orcdebugging orcjit orcshared orctargetprocess passes powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remark
s riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvtargetmca runtimedyld sandboxir scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparc
disassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target targetparser telemetry textapi textapibinar
yreader transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo webassemblyutils windowsdriver windowsmanif
est x86 x86asmparser x86codegen x86desc x86disassembler x86info x86targetmca xray xtensa xtensaasmparser xtensacodegen xtensadesc xtensadisassembler xtensainfo" LLVM_FILECHECK="/home/e
ric/Temp/rust/build/x86_64-unknown-linux-gnu/ci-llvm/bin/FileCheck" NODE="/usr/bin/node" PYTHON="/usr/bin/python3" RUSTC="/home/eric/Temp/rust/build/x86_64-unknown-linux-gnu/stage2/bin
/rustc" RUSTDOC="/home/eric/Temp/rust/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" SOURCE_ROOT="/home/eric/Temp/rust" TARGET="x86_64-unknown-linux-gnu" TARGET_EXE_DYLIB_PATH="/ho
me/eric/Temp/rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/eric/Temp/rust/build/x86_64-unknown-linux-gnu/test/run-make/repr128-dwarf/rmake
"
stdout: none
--- stderr -------------------------------

thread 'main' panicked at /home/eric/Temp/rust/tests/run-make/repr128-dwarf/rmake.rs:93:26:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
------------------------------------------



failures:
    [run-make] tests/run-make/repr128-dwarf

This was discovered while trying to merge #138200. However, I don't think that PR is directly related given the above reproduces on latest master (currently dea1661).

I can't explain why current CI is passing, given that the above reproduces the issue (for me).

This seems to be caused by #137643
cc @beetrees @jieyouxu @weihanglo

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions