Skip to content

debug_loc info is (slightly) non-deterministic #45397

Closed

Description

I've been comparing Firefox build on Mozilla CI with and without sccache, and after having eliminated all the expected differences, there was one remaining in the resulting binary that ended up being caused by rust code. That difference was in the build-id of libxul.so, as well as the checksum in the gnu_debuglink section. Both are influenced by the contents of debug sections. I repeated the comparisons with 2 builds without sccache and got the same discrepancy.

Further analysis revealed that the root difference lies in the debug_loc data in gkrust-b23623c450cfcda2.0.o, that seems to be related to the _ZN5style10properties10LonghandId11parse_value17heed0466ee2fc256eE symbol (style::properties::LonghandId::parse_value). That function is generated by a python script, but I validated that the generated source that produced the different object files was identical.

I can provide the two .o files I've been comparing, but they are each 200MB large (or about 27MB when compressed with zstd) so I don't know where to put them.

The "slightly" in the bug summary is because, compared to the size of those files, the differences are rather small. I'll additionally note that dwarfdump doesn't like those .o files and fails with:

dwarfdump ERROR:  reference form with no valid local ref?!, offset=<0x00050377>:  DW_DLE_ATTR_FORM_OFFSET_BAD (119)

I'll do another comparison run with LTO disabled, which hopefully would produce smaller .o files.

Cc: @michaelwoerister @luser @froydnj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)A-reproducibilityArea: Reproducible / deterministic buildsC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions