Skip to content

Building rustc with -g hits LLVM assert #19848

Closed
@bkoropoff

Description

@bkoropoff
$ RUSTFLAGS="-g" make -j8 rustc-stage1
...
rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore
rustc: /home/rustbuild/src/rust-buildbot/slave/snap3-linux/build/src/llvm/lib/IR/Instructions.cpp:1086: void llvm::StoreInst::AssertOK(): Assertion `getOperand(0)->getType() == cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr must be a pointer to Val type!"' failed.
make: *** [x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/stamp.core] Aborted

Backtrace from core file:

#0  0x00007f506ba0a877 in raise () from /lib64/libc.so.6
#1  0x00007f506ba0bf68 in abort () from /lib64/libc.so.6
#2  0x00007f506ba037d6 in __assert_fail_base () from /lib64/libc.so.6
#3  0x00007f506ba03882 in __assert_fail () from /lib64/libc.so.6
#4  0x00007f506e118c61 in llvm::StoreInst::AssertOK() ()
#5  0x00007f506d7c6666 in llvm::IRBuilder<true, llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true> >::CreateStore(llvm::Value*, llvm::Value*, bool) ()
#6  0x00007f506d261e62 in trans::builder::Builder$LT$$x27a$C$$x20$x27tcx$GT$::store::h30422c6d66c8362fMar ()
#7  0x00007f506d277697 in trans::base::trans_closure::hd73aafc90fa3ac9cVfu ()
#8  0x00007f506d211d82 in trans::expr::trans_rvalue_dps_unadjusted::h9838b52bc02d24d9cgj ()
#9  0x00007f506d20d688 in trans::expr::trans_unadjusted::h7b542949e8fd1f0aUCi ()
#10 0x00007f506d1c736c in trans::expr::trans::h6758cf65ffe4e433IQh ()
#11 0x00007f506d2068c0 in trans::callee::trans_args::h87945a0a00d776c99oh ()
#12 0x00007f506d1cea5d in trans::callee::trans_call_inner::h3407dfe88b63d12913g ()
#13 0x00007f506d20f8ef in trans::expr::trans_rvalue_dps_unadjusted::h9838b52bc02d24d9cgj ()
#14 0x00007f506d1c60f8 in trans::expr::trans_into::h3e5c3cd16b2b4e12WMh ()
#15 0x00007f506d1c6df4 in trans::controlflow::trans_block::hf81d152713271e77FYd ()
#16 0x00007f506d27842f in trans::base::trans_closure::hd73aafc90fa3ac9cVfu ()
#17 0x00007f506d1b94ce in trans::base::trans_fn::h8314c0146f176259cru ()
#18 0x00007f506d1b5007 in trans::base::trans_item::hdac7426481f8746aeMu ()
#19 0x00007f506d279c49 in trans::base::trans_mod::h03145c37fc751d9cJRu ()
#20 0x00007f506d1b4e7f in trans::base::trans_item::hdac7426481f8746aeMu ()
#21 0x00007f506d279c49 in trans::base::trans_mod::h03145c37fc751d9cJRu ()
#22 0x00007f506d27ed07 in trans::base::trans_crate::hff0a239bca25518eoIv ()
#23 0x00007f506cca175d in driver::phase_4_translate_to_llvm::h1d8e5fa121da5744BCa ()
#24 0x00007f506cc88b98 in driver::compile_input::h99875561ae679834pba ()
#25 0x00007f506cd23d38 in run_compiler::h68c8d9fcc09b1d69kYb ()
#26 0x00007f506cd2262c in run::closure.21400 ()
#27 0x00007f506cd33f3b in task::TaskBuilder::try_future::closure.22849 ()
#28 0x00007f506e8e18f3 in task::TaskBuilder::spawn_internal::closure.30601 ()
#29 0x00007f506e8fc732 in task::Task::spawn::closure.5727 ()
#30 0x00007f506e8fee9c in rust_try_inner ()
#31 0x00007f506e8fee86 in rust_try ()
#32 0x00007f506e8fc7d3 in unwind::try::h67138f1a9143bb4fTyc ()
#33 0x00007f506e8fc5dc in task::Task::run::hd7a7ebf54ed491e4fKb ()
#34 0x00007f506e8fc228 in task::Task::spawn::closure.5703 ()
#35 0x00007f506e8fd655 in thread::thread_start::h69086febf2f5cecdw1b ()
#36 0x00007f506c6c3ee5 in start_thread () from /lib64/libpthread.so.0
#37 0x00007f506bac9b8d in clone () from /lib64/libc.so.6

This looks similar to #17257, but I wasn't able to reproduce crashes on some of the examples in there, so I'm opening a separate issue for now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions