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

debuginfo: LTO triggers assertion in llvm::LexicalScopes::getOrCreateRegularScope() #17677

Closed
michaelwoerister opened this issue Oct 1, 2014 · 1 comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.)

Comments

@michaelwoerister
Copy link
Member

Steps to reproduce:

  1. Build rustc with RUSTFLAGS_STAGE2=-g make rustc-stage2
  2. Try to compile a simple hello-world program with rustc ./ltocrash.rs -g -C lto
fn main() {
    println!("Hello World!");
}
  1. Observe that rustc crashes with the following error:
rustc: /home/mw/rust/src/llvm/lib/CodeGen/LexicalScopes.cpp:179: llvm::LexicalScope* llvm::LexicalScopes::getOrCreateRegularScope(llvm::MDNode*): Assertion `DISubprogram(Scope).describes(MF->getFunction())' failed.

A very similar issue (#17201) occurred in non-LTO cases.

@michaelwoerister michaelwoerister added the A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) label Oct 1, 2014
@alexcrichton
Copy link
Member

This no longer happens on stable, so closing as fixed, yay!

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

2 participants