lix/doc/manual/rl-next
Lily Ballard 69957a971e libstore: replace random() calls with atomic counter
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: I4c4c4c9796613573ffefd29cc8efe3d07839facc
2024-10-30 19:54:43 -07:00
..
.gitkeep release: release notes for 2.90.0 2024-06-15 18:46:18 -07:00
allowsubstitutes-errors.md fix: good errors for failures caused by allowSubstitutes 2024-08-23 17:49:15 -07:00
alt-left-and-alt-right-in-repl.md repl: Patch editline to recognize Meta-Left & Meta-Right 2024-09-09 15:34:50 -07:00
content-encodings.md libstore: use curl content-encoding support, not our own 2024-10-28 18:52:49 +00:00
ctrl-c-improved.md Add release note for CTRL-C improvements 2024-10-05 10:40:51 -07:00
deprecated-features.md libexpr: Soft-deprecate ancient let syntax 2024-08-21 12:59:03 +02:00
download-protocols.md libstore: restrict curl protocols 2024-10-23 11:32:14 +00:00
fetchGit-regression.md libfetchers/git: restore compat with builtins.fetchGit from 2.3 2024-09-28 14:52:06 +02:00
http-proxy-for-s3.md fix: use http proxy for s3 access 2024-08-23 13:23:33 -07:00
libstore-random.md libstore: replace random() calls with atomic counter 2024-10-30 19:54:43 -07:00
nix-fmt-default-argument.md fix(nix fmt): remove the default "." argument 2024-09-26 14:32:29 -07:00
pytest-suite.md testsuite: use xdist for parallel test running 2024-10-09 14:47:39 -07:00
readline-support-removed.md Remove readline support 2024-09-16 10:48:20 -07:00
relative-and-tilde-paths-in-config.md Support relative and ~/ paths in config settings 2024-08-25 15:54:22 -07:00
remove-mono-coreutils-dependency.md chore: remove monolithic coreutils requirement 2024-10-30 15:12:35 +04:00
report-differing-outputs.md libstore: report all differing outputs rather than just the first 2024-10-29 18:34:54 +01:00
stack-traces.md main: log stack traces for std::terminate 2024-09-25 14:03:45 -07:00
verify-tls.md [security] builtin:fetchurl: Enable TLS verification 2024-09-25 18:40:58 -07:00