Skip to content

tests/run-make/embed-source-dwarf fails with rust.remap-debuginfo = true #166344

Description

@bardiharborow

tests/run-make/embed-source-dwarf fails when rustc is built with rust.remap-debuginfo = true. The test expects only main.rs to have embedded source, but six std files are embedded too:

[tests/run-make/embed-source-dwarf/rmake.rs:65:5] &sources = {
    "backtrace.rs": "...",
    "hint.rs": "...",
    "common.rs": "...",
    "rt.rs": "...",
    "main.rs": "// hello\nfn main() {}\n",
    "function.rs": "...",
    "process.rs": "...",
}

thread 'main' panicked at tests/run-make/embed-source-dwarf/rmake.rs:66:5:
assertion `left == right` failed
  left: 7
 right: 1

It passed in 1.96.1 and fails in 1.97.1 and 1.98.1. 1.97 is the first release with #155995, which made -Zembed-source embed sources for files from other crates.

Seen in Debian's rustc builds on amd64 and arm64. Full logs (1.98.1):

@rustbot label +C-bug +A-testsuite +A-debuginfo +A-path-remapping +T-compiler

Activity

  1. added
    C-bug
    on Nov 22, 2026
  2. added
    needs-triage
    A-debuginfo
    A-path-remapping
    A-testsuite
    T-compiler
    on Nov 22, 2026
  3. paradoxicalguy commented on Nov 26, 2026

    @paradoxicalguy
    Member

    @rustbot claim

  4. added a commit that references this issue on Nov 26, 2026
    88cf570
  5. added a commit that references this issue on Nov 27, 2026
    6e8f1fc
  6. removed
    needs-triage
    on Nov 27, 2026
  7. added a commit that references this issue on Nov 27, 2026
    d999a3b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

A-debuginfoA-path-remappingA-testsuiteC-bugT-compiler

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions