Skip to content

Commit 0d50045

Browse files
committed
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.
1 parent af2ddfd commit 0d50045

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env bash
2+
3+
source ./common.sh
4+
5+
requireGit
6+
7+
flakeDir="$TEST_ROOT/flake"
8+
createGitRepo "$flakeDir"
9+
10+
cat >"$flakeDir/flake.nix" <<EOF
11+
{
12+
inputs = {
13+
};
14+
15+
outputs =
16+
_:
17+
let
18+
in
19+
{
20+
packages.$system.default = throw "oh no";
21+
};
22+
}
23+
EOF
24+
25+
git -C "$flakeDir" add flake.nix
26+
27+
# regression #12527 and #11286
28+
echo ":env" | expect 1 nix eval "$flakeDir#packages.${system}.default" --debugger

tests/functional/flakes/meson.build

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ suites += {
2828
'commit-lock-file-summary.sh',
2929
'non-flake-inputs.sh',
3030
'relative-paths.sh',
31-
'symlink-paths.sh'
31+
'symlink-paths.sh',
32+
'debugger.sh'
3233
],
3334
'workdir': meson.current_source_dir(),
3435
}

0 commit comments

Comments
 (0)