mirror of
https://github.com/ruuda/rcl.git
synced 2025-12-23 04:47:19 +00:00
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.
42 lines
919 B
Text
42 lines
919 B
Text
// This is a regression test for an input that caused stack overflow.
|
|
let f = f => f(f)()()()()()()()()();
|
|
f(f)
|
|
|
|
# output:
|
|
stdin:2:14
|
|
╷
|
|
2 │ let f = f => f(f)()()()()()()()()();
|
|
╵ ^~~~
|
|
Error: Evaluation budget exceeded. This expression exceeds the maximum evaluation depth of 150.
|
|
|
|
stdin:2:15
|
|
╷
|
|
2 │ let f = f => f(f)()()()()()()()()();
|
|
╵ ^
|
|
In call to function.
|
|
|
|
stdin:2:15
|
|
╷
|
|
2 │ let f = f => f(f)()()()()()()()()();
|
|
╵ ^
|
|
In call to function.
|
|
|
|
stdin:2:15
|
|
╷
|
|
2 │ let f = f => f(f)()()()()()()()()();
|
|
╵ ^
|
|
In call to function.
|
|
|
|
stdin:2:15
|
|
╷
|
|
2 │ let f = f => f(f)()()()()()()()()();
|
|
╵ ^
|
|
In call to function.
|
|
|
|
stdin:2:15
|
|
╷
|
|
2 │ 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.
|