mirror of
https://github.com/NixOS/nix
synced 2025-06-24 22:11:15 +02:00
tests/functional: Add flake-based regression for debugger use-after-free
This is the simplest reproducer I have. It would be great to find a repro without flakes, but I guess this should be ok for now.
This commit is contained in:
parent
af2ddfdb3b
commit
0d5004508f
2 changed files with 30 additions and 1 deletions
28
tests/functional/flakes/debugger.sh
Normal file
28
tests/functional/flakes/debugger.sh
Normal file
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
source ./common.sh
|
||||
|
||||
requireGit
|
||||
|
||||
flakeDir="$TEST_ROOT/flake"
|
||||
createGitRepo "$flakeDir"
|
||||
|
||||
cat >"$flakeDir/flake.nix" <<EOF
|
||||
{
|
||||
inputs = {
|
||||
};
|
||||
|
||||
outputs =
|
||||
_:
|
||||
let
|
||||
in
|
||||
{
|
||||
packages.$system.default = throw "oh no";
|
||||
};
|
||||
}
|
||||
EOF
|
||||
|
||||
git -C "$flakeDir" add flake.nix
|
||||
|
||||
# regression #12527 and #11286
|
||||
echo ":env" | expect 1 nix eval "$flakeDir#packages.${system}.default" --debugger
|
|
@ -28,7 +28,8 @@ suites += {
|
|||
'commit-lock-file-summary.sh',
|
||||
'non-flake-inputs.sh',
|
||||
'relative-paths.sh',
|
||||
'symlink-paths.sh'
|
||||
'symlink-paths.sh',
|
||||
'debugger.sh'
|
||||
],
|
||||
'workdir': meson.current_source_dir(),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue