rcl/golden/error/recursion_stack_overflow_2.test
Ruud van Asseldonk bb34ecb643 Adjust stack depth counter again to avoid overflow
The bad input 3 was discovered by the fuzzer after I did the expansion.
I fixed it by lowering the limit, then it immediately discovered input
4 which had the same structure. So the right solution here is to add
more depth counters. It might mean that we double-count function calls,
but it does help.
2024-02-24 21:54:35 +01:00

45 lines
1 KiB
Text

// This is a regression test for an input discovered by the fuzzer.
// It managed to escape the previous evaluation depth limit because sequence
// literals were not limited. It is minimal: both the brackets and four calls
// are needed to escape the evaluation depth limit of 150.
let f = f=> {{f(f)()()()}};
f(f)
# output:
stdin:5:15
5 │ let f = f=> {{f(f)()()()}};
╵ ^~~~
Error: Evaluation budget exceeded. This expression exceeds the maximum evaluation depth of 150.
stdin:5:16
5 │ let f = f=> {{f(f)()()()}};
╵ ^
In call to function.
stdin:5:16
5 │ let f = f=> {{f(f)()()()}};
╵ ^
In call to function.
stdin:5:16
5 │ let f = f=> {{f(f)()()()}};
╵ ^
In call to function.
stdin:5:16
5 │ let f = f=> {{f(f)()()()}};
╵ ^
In call to function.
stdin:5:16
5 │ let f = f=> {{f(f)()()()}};
╵ ^
In call to function.
Note: The call stack is too deep to display in full. Only the innermost calls are shown above.