nix-super/src/libstore-tests
Sergei Zimmerman 5bc8957c73 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.
2024-11-06 02:28:21 +03:00
..
data Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
.version Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
build-utils-meson Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
common-protocol.cc Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
content-address.cc Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
derivation-advanced-attrs.cc Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
derivation.cc Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
derived-path.cc Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
downstream-placeholder.cc Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
http-binary-cache-store.cc Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
legacy-ssh-store.cc Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
local-binary-cache-store.cc Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
local-overlay-store.cc Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
local-store.cc Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
local.mk Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
machines.cc Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
meson.build Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
nar-info-disk-cache.cc Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
nar-info.cc Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
nix_api_store.cc Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
outputs-spec.cc Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
package.nix Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
path-info.cc Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
path.cc Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
references.cc Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
s3-binary-cache-store.cc Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
serve-protocol.cc fix(libstore-tests): remove use-after-free bug for StringSource 2024-11-06 02:28:21 +03:00
ssh-store.cc Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
store-reference.cc Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
uds-remote-store.cc Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
worker-protocol.cc fix(libstore-tests): remove use-after-free bug for StringSource 2024-11-06 02:28:21 +03:00