Skip to content

For function signatures with arrays, the generated PDB file crashes MSVC's msdia DLL #40477

Closed
@staktrace

Description

@staktrace

Backstory in https://bugzilla.mozilla.org/show_bug.cgi?id=1343625 (comment 16 has dmajor's analysis).

In summary: when building on windows, rustc can generate symbol names into the .pdb file that microsoft's DIA library doesn't like. In particular, it can result in calls to get_undecoratedNameEx to crash with a divide-by-zero. This is a bug in the DIA library which I reported to a friend at Microsoft and which has been fixed. However, older versions of the DIA library still have this problem, so rustc should probably be updated to not generate such symbols.

This bug results in the mozilla-central dump_syms.exe crashing which in turn generates a bad .sym file which causes windows debug tests to blow up. For now I have a workaround patch ready to land that catches the div-by-zero in dump_syms.exe. @luser suggested that if there is some runtime workaround (e.g. setting rustflags or something) that can avoid this problem, we should do that instead - so if there is anything I can try along those lines, please let me know.

/cc @michaelwoerister

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions