Lily Ballard
69957a971e
random() is not thread-safe, it relies on global state, and calling it
from worker threads can result in multiple threads producing the same
value. It also doesn't guarantee unique values even in single-threaded
use.
Use an atomic counter for the use-case of generating temporary paths,
and switch to a thread-local RNG for the one remaining call.
This will probably fix https://github.com/NixOS/nix/issues/7273 though
I'm not willing to risk corrupting my store to find out.
Change-Id:
|
||
---|---|---|
.. | ||
.gitkeep | ||
allowsubstitutes-errors.md | ||
alt-left-and-alt-right-in-repl.md | ||
content-encodings.md | ||
ctrl-c-improved.md | ||
deprecated-features.md | ||
download-protocols.md | ||
fetchGit-regression.md | ||
http-proxy-for-s3.md | ||
libstore-random.md | ||
nix-fmt-default-argument.md | ||
pytest-suite.md | ||
readline-support-removed.md | ||
relative-and-tilde-paths-in-config.md | ||
remove-mono-coreutils-dependency.md | ||
report-differing-outputs.md | ||
stack-traces.md | ||
verify-tls.md |