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 DIG assertion when running make check with -g #12191

Closed
nrc opened this issue Feb 11, 2014 · 6 comments
Closed

LLVM DIG assertion when running make check with -g #12191

nrc opened this issue Feb 11, 2014 · 6 comments
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.)

Comments

@nrc
Copy link
Member

nrc commented Feb 11, 2014

make check fails when run with -g with error:

llvm-extract: /home/ncameron/rust2/src/llvm/lib/Transforms/IPO/StripSymbols.cpp:339: virtual bool {anonymous}::StripDeadDebugInfo::runOnModule(llvm::Module&): Assertion `DIG.Verify() && "DIG must verify as DIGlobalVariable."' failed.

In test codegen/iterate-over-array.rs

@jdm
Copy link
Contributor

jdm commented Feb 11, 2014

Flashing the big, bright bat signal for @michaelwoerister :)

@michaelwoerister
Copy link
Member

That's interesting. We don't generate any global variable info at the moment. I'll try to reproduce this.

@michaelwoerister
Copy link
Member

I can't reproduce this. How exactly do you compile and run the tests? I tried with RUSTFLAGS_STAGE2=-g make check-stage2-codegen and RUSTFLAGS_STAGE1=-g make check-stage1-codegen. Also, what architecture/OS do you use?

@nrc
Copy link
Member Author

nrc commented Feb 12, 2014

export RUSTFLAGS=-g
make check

Ubuntu on x64. No fancy cross compiling or anything. I don't think I needed to anything other than that to repro. Maybe need make clean? I could repro on master and a branch. I'll try again later with today's pull just to make sure it sill happens.

@nrc
Copy link
Member Author

nrc commented Feb 17, 2014

I tried to repro this today in a clean repo (on a new machine) - make chek still fails, but no longer with DIG errors. I get

error: compilation failed!
command: x86_64-unknown-linux-gnu/stage2/bin/rustc /home/nick/rust/src/test/run-pass/simd-generics.rs -L x86_64-unknown-linux-gnu/test/run-pass --target=x86_64-unknown-linux-gnu -L x86_64-unknown-linux-gnu/test/run-pass/simd-generics.stage2-x86_64-unknown-linux-gnu.libaux -o x86_64-unknown-linux-gnu/test/run-pass/simd-generics.stage2-x86_64-unknown-linux-gnu -g --cfg rtopt --cfg debug -C prefer-dynamic -O -L x86_64-unknown-linux-gnu/rt

rustc: /home/nick/rust/src/llvm/include/llvm/Support/Casting.h:240: typename llvm::cast_retty<X, Y*>::ret_type llvm::cast(Y*) [with X = llvm::StructType; Y = llvm::Type; typename llvm::cast_retty<X, Y*>::ret_type = llvm::StructType*]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.

And a few other errors. I'll file a new issue for the general case. I think we should maybe leave this one open for now, since I suspect once we fix those errors, the DIG ones may reappear.

@michaelwoerister
Copy link
Member

This error doesn't occur for me anymore. There is another bug related to LTO but that is already document in #13681. With that out of the way, make check passes with RUSTFLAGS=-g on Linux x64 and OSX x64 for me, so I'll close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.)
Projects
None yet
Development

No branches or pull requests

3 participants