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

rustc -Z debug-info is causing llvm assert failures #6814

Closed
pnkfelix opened this issue May 29, 2013 · 3 comments
Closed

rustc -Z debug-info is causing llvm assert failures #6814

pnkfelix opened this issue May 29, 2013 · 3 comments
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

Comments

@pnkfelix
Copy link
Member

% pwd
/Users/pnkfelix/Dev/Mozilla/rust.git
% objdir/x86_64-apple-darwin/stage2/bin/rustc -Z debug-info src/test/run-pass/hello.rs
Assertion failed: (TheCU && "Unable to find compile unit!"), function beginFunction, file /Users/pnkfelix/Dev/Mozilla/rust.git/src/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp, line 1367.
Stack dump:
0. Running pass 'Function Pass Manager' on module 'hello.rc'.

  1. Running pass 'X86 Assembly / Object Emitter' on function '@_ZN4main16_113178cfcd612383_00E'
    Illegal instruction: 4

Might be related to #5836

@pnkfelix
Copy link
Member Author

Nominating for milestone #3, "feature complete."

Though if we expect any tools out there to make use of debug-info, then maybe we should be filing this under milestone #2: "backward compatible." (If I could some way to justify getting it into milestone #1, I would...)

@vadimcn vadimcn mentioned this issue Jun 14, 2013
bors added a commit that referenced this issue Jun 17, 2013
This commit fixes rustc's debug info generation and turns debug-info tests back on.

The old generator used to write out LLVM metadata directly, however it seems that debug metadata format is not stable and keeps changing from release to release.  So I wrapped LLVM's official debug info API - the DIBuilder class, and now rustc will use that.

One bit of old functionality that still doesn't work, is debug info for function arguments.  Someone more familiar with the compiler guts will need to look into that.

Also, unfortunately, debug info is still won't work on Windows,- due to a LLVM bug (http://llvm.org/bugs/show_bug.cgi?id=16249).

Resolves issues #5836, #5848, #6814
@pnkfelix
Copy link
Member Author

Supposedly fixed by commit 4bf074c. I'll close after I check that.

@msullivan
Copy link
Contributor

This was fixed.

flip1995 pushed a commit to flip1995/rust that referenced this issue Mar 11, 2021
Fix false positives on procedural macros of `missing_inline_in_public_items` lint

Fixes rust-lang#6486.

changelog: Fix false positives on procedural macros of `missing_inline_in_public_items` lint.
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.) I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
Projects
None yet
Development

No branches or pull requests

2 participants