Skip to content

new non-determinism in linker maps introduced recently #142989

Open
@steven807

Description

@steven807

PR 141769 looks like it introduced non-determinism in the generation of dylibs -- it is looking like the tmpdir is being introduced into the linker map file -- perhaps when creating the .rustc section here:

pub fn create_compressed_metadata_file(

We are seeing it in determinism-validation builds in Fuchsia.

Note: the original description claimed that the .so files had also changed, hence some of the discussion below.
Although the .so files are identical, we are seeing .so.map files differing, with distinct tmp paths, e.g.:

            f91ef            f91ef      431     1         .../rust/linux-x64/lib/rustlib/x86_64-unknown-fuchsia/lib/libcompiler_builtins-84c11efc675a4b65.rlib(compiler_builtins-84c11efc675a4b65.compiler_builtins.ac0a882909fb5ff0-cgu.018.rcgu.o):(.debug_line)
            f9620            f9620      30d     1         obj/zircon/system/ulib/sync/libsync.a(libsync.mutex.c.o):(.debug_line)
                0                0   1cf28a     1 .rustc
-               0                0   1cf28a     1         /tmp/rustcli35e4/rmeta.o:(.rustc)
+               0                0   1cf28a     1         /tmp/rustcvBrdn3/rmeta.o:(.rustc)
                0                0   1cf28a     1                 rust_metadata_vfs_3772e3b421ca7a16
                0                0      187     1 .debug_loclists
                0                0      22b     1         obj/zircon/system/ulib/sync/libsync.a

Suggested label: A-reproducibility

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-reproducibilityArea: Reproducible / deterministic buildsC-bugCategory: This is a bug.I-prioritizeIssue: Indicates that prioritization has been requested for this issue.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-untriagedUntriaged performance or correctness regression.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions