Rust generate erroneous debug line information for non-local panic handlers #59479
Labels
A-debuginfo
Area: Debugging information in compiled programs (DWARF, PDB, etc.)
C-bug
Category: This is a bug.
E-help-wanted
Call for participation: Help is requested to fix this issue.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Related to #55352, Rustc 1.33 generates incorrect debugging information for panic handlers not in the current crate:
Compiling:
as
src/lib.rs
, Rust generates a.debug_lines
section, which contains the following (fromreadelf --debug-dump=decodedline
):This means that the
/rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libtest/lib.rs
compilation unit points a debug line at line 1 ofsrc/lib.rs
Reading through the generated assembly (via
objdump -S -d
)1ef52
is part of the panic handler if a test fails.Thus it's not possible to cover the code without having a test fail!
The text was updated successfully, but these errors were encountered: