Skip to content

Windows hard-linked executables are modified in place #8348

Closed
@rogday

Description

@rogday

Problem

As the title says, cargo overrides all executables in a build folder. Expected behavior: don't override unrelated executables.

Steps

  1. Write any program and run 'cargo build/run [--release]'.
  2. Locate compiled binary(assume its foo.exe) and calculate its checksum.
  3. Rename the executable to something different(assume bar.exe).
  4. Change your program a little bit to differentiate resulting binary and compile again.
  5. Compare checksums of foo.exe and bar.exe - they are the same.

Notes

It doesn't work with third-party binary.

Output of cargo version:

cargo 1.45.0-nightly (9fcb8c1 2020-05-25)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions