1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-24 03:09:35 +01:00
nix/src
Felix Uhl f282ef5a56 fix: segfault in positional arg completion
Adding the inputPath as a positional feature uncovered this bug.
As positional argument forms were discarded from the `expectedArgs`
list, their closures were not. When the `.completer` closure was then
called, part of the surrounding object did not exist anymore.

This didn't cause an issue before, but with the new call to
`getEvalState()` in the "inputs" completer in nix/flake.cc, a segfault
was triggered reproducibly on invalid memory access to the `this`
pointer, which was always 0.

The solution of splicing the argument forms into a new list to extend
their lifetime is a bit of a hack, but I was unable to get the "nicer"
iterator-based solution to work.
2023-10-31 15:33:57 +01:00
..
build-remote Allow dynamic derivation deps in inputDrvs 2023-09-07 10:39:37 -04:00
libcmd Overhaul nix flake update and lock commands 2023-10-31 15:33:57 +01:00
libexpr Overhaul nix flake update and lock commands 2023-10-31 15:33:57 +01:00
libfetchers Input: Replace markFileChanged() by putFile() 2023-10-25 18:30:29 +02:00
libmain Overhaul completions, redo #6693 (#8131) 2023-10-23 15:03:11 +02:00
libstore Turn derivation unit tests into unit characterization tests 2023-10-26 18:09:01 -04:00
libutil fix: segfault in positional arg completion 2023-10-31 15:33:57 +01:00
nix Overhaul nix flake update and lock commands 2023-10-31 15:33:57 +01:00
nix-build nix-shell: fix shebang whitespace parsing 2023-10-23 15:56:07 +02:00
nix-channel Remove fetchers::Tree and move tarball-related stuff into its own header 2023-10-20 19:56:52 +02:00
nix-collect-garbage Clean up a few things related to profiles (#8526) 2023-06-19 04:04:59 +00:00
nix-copy-closure Remove FormatOrString and remaining uses of format() 2023-03-02 15:57:54 +01:00
nix-env printStats -> maybePrintStats 2023-10-09 16:34:35 +02:00
nix-instantiate printStats -> maybePrintStats 2023-10-09 16:34:35 +02:00
nix-store Factor out serialization for BuildResult 2023-10-20 15:19:28 -04:00
resolve-system-dependencies Remove FormatOrString and remaining uses of format() 2023-03-02 15:57:54 +01:00
toml11 Replace cpptoml with toml11 2021-12-17 22:03:33 +01:00