The fuzzer has discovered some interesting programs that diverge, in particular this one:
let f = g => g(g(h => k => g(g(h))));
f(f)
It still puzzles me: it loops infinitely without causing a stack overflow. To make sure the fuzzer doesn’t get stuck on cases like these, add a limit on the number of evaluation steps. Perhaps in the future it should be configurable for people who want to evaluate huge documents for legitimate reasons, but for now a hard-coded limit works fine.
(This is extracted from #26, I added it there first, but I keep running into this and that big pull request will take some time to get merged. So it’s good to extract pieces that can be merged already.)
The fuzzer has discovered some interesting programs that diverge, in particular this one:
It still puzzles me: it loops infinitely without causing a stack overflow. To make sure the fuzzer doesn’t get stuck on cases like these, add a limit on the number of evaluation steps. Perhaps in the future it should be configurable for people who want to evaluate huge documents for legitimate reasons, but for now a hard-coded limit works fine.
(This is extracted from #26, I added it there first, but I keep running into this and that big pull request will take some time to get merged. So it’s good to extract pieces that can be merged already.)