diff options
author | eldritch horrors <pennae@lix.systems> | 2024-03-04 07:35:20 +0100 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-03-04 07:35:20 +0100 |
commit | 96f1a404d08d1dd00ef395bcdc53c7599c860ecf (patch) | |
tree | c2c10849ccfa865ae649be873fa9ed0d6d4d4da6 /tests/functional/lang/eval-fail-duplicate-traces.nix | |
parent | e1b1e6f7abb62b7e86a1d12aead1bd931089cd7a (diff) |
Merge pull request #9617 from 9999years/stack-overflow-segfault
Fix segfault on infinite recursion in some cases
(cherry picked from commit bf1b294bd81ca76c5ec9fe3ecd52196bf52a8300)
Change-Id: Id137541426ec8536567835953fccf986a3aebf16
Diffstat (limited to 'tests/functional/lang/eval-fail-duplicate-traces.nix')
-rw-r--r-- | tests/functional/lang/eval-fail-duplicate-traces.nix | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/functional/lang/eval-fail-duplicate-traces.nix b/tests/functional/lang/eval-fail-duplicate-traces.nix new file mode 100644 index 000000000..17ce374ec --- /dev/null +++ b/tests/functional/lang/eval-fail-duplicate-traces.nix @@ -0,0 +1,9 @@ +# Check that we only omit duplicate stack traces when there's a bunch of them. +# Here, there's only a couple duplicate entries, so we output them all. +let + throwAfter = n: + if n > 0 + then throwAfter (n - 1) + else throw "Uh oh!"; +in + throwAfter 2 |