Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linker invocation failed with: nul byte found in provided data #72744

Closed
tmiasko opened this issue May 29, 2020 · 1 comment
Closed

Linker invocation failed with: nul byte found in provided data #72744

tmiasko opened this issue May 29, 2020 · 1 comment
Labels
A-linkage Area: linking into static, shared libraries and binaries A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. O-macos Operating system: macOS T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@tmiasko
Copy link
Contributor

tmiasko commented May 29, 2020

In rollup #72681, the long-linker-command-lines test failed on macOS x86_64-apple with:

error: could not exec the linker `/Users/runner/runners/2.168.2/work/1/s/build/x86_64-apple-darwin/test/run-make-fulldeps/long-linker-command-lines/long-linker-command-lines/foo`
  |
  = note: nul byte found in provided data
  = note: "/Users/runner/runners/2.168.2/work/1/s/build/x86_64-apple-darwin/test/run-make-fulldeps/long-linker-command-lines/long-linker-command-lines/foo" "-m64" "-L" "/Users/runner/runners/2.168.2/w...

error: aborting due to previous error

', foo.rs:76:13

Which means that rustc attempted to invoke a linker, but incorrectly provided a string with a null byte to a Command through arg, cwd, env.

Hypothetical reproduction steps (would be nice to attempt to reproduce on macOS):

$ cd src/test/run-make-fulldeps/long-linker-command-lines
$ rustc -gO foo.rs
# NOTE: Expects TMPDIR environment variable to be set.
$ while ./foo; do :; done
@tmiasko tmiasko added the C-bug Category: This is a bug. label May 29, 2020
@jonas-schievink jonas-schievink added A-linkage Area: linking into static, shared libraries and binaries A-testsuite Area: The testsuite used to check the correctness of rustc O-macos Operating system: macOS T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 29, 2020
@tmiasko
Copy link
Contributor Author

tmiasko commented Jun 10, 2020

Non-reproducible, closing.

@tmiasko tmiasko closed this as completed Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linkage Area: linking into static, shared libraries and binaries A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. O-macos Operating system: macOS T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants