1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 01:51:47 +02:00
nix/tests
Sergei Zimmerman e863e6ab83 fix(libstore-tests): remove use-after-free bug for StringSource
Unfortunately `StringSource` class is very easy was very easy to misuse
because the ctor took a plain `std::string_view` which has a bad habit
of being implicitly convertible from an rvalue `std::string`. This lead
to unintentional use-after-free bugs.

This patch makes `StringSource` much harder to misuse by disabling the ctor
from a `std::string &&` (but `const std::string &` is ok).

Fix affected tests from libstore-tests.
Reformat those tests with clangd's range formatting since the diff is tiny
and it seems appropriate.

(cherry picked from commit 5bc8957c73)
2025-01-10 10:08:26 +00:00
..
functional Merge pull request #12144 from NixOS/mergify/bp/2.24-maintenance/pr-12046 2025-01-07 08:06:58 +01:00
installer tests: test with conflicting profile links 2023-12-30 06:24:06 +00:00
nixos test: Add hydraJobs.tests.functional_symlinked-home 2025-01-07 07:20:55 +01:00
unit fix(libstore-tests): remove use-after-free bug for StringSource 2025-01-10 10:08:26 +00:00
repl-completion.nix Add repl completion test 2024-05-27 09:58:49 +02:00