1
0
Fork 0
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:
Sergei Zimmerman 2025-02-21 12:29:54 +00:00
parent af2ddfdb3b
commit 0d5004508f
2 changed files with 30 additions and 1 deletions

View 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

View file

@ -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(),
}