lix/doc/manual/rl-next/stack-overflow-segfaults.md
Jade Lovelace 272db8af1b doc: add release note credits and categories for all the changes in Lix
This does not add missing release notes, and it doesn't do anything
about the profiles feature we would really like to have so we can have
consistent credit.

Change-Id: I72a6f7acfcff85f380be17dac76501a6f4693776
2024-05-15 14:33:35 -07:00

815 B

synopsis issues prs cls category credits
Some stack overflow segfaults are fixed 9616 9617 205 Improvements
9999years
horrors

The number of nested function calls has been restricted, to detect and report infinite function call recursions. The default maximum call depth is 10,000 and can be set with the max-call-depth option.

This fixes segfaults or the following unhelpful error message in many cases:

error: stack overflow (possible infinite recursion)

Before:

$ nix-instantiate --eval --expr '(x: x x) (x: x x)'
Segmentation fault: 11

After:

$ nix-instantiate --eval --expr '(x: x x) (x: x x)'
error: stack overflow

       at «string»:1:14:
            1| (x: x x) (x: x x)
             |              ^