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 /src/libexpr/eval-settings.hh | |
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 'src/libexpr/eval-settings.hh')
-rw-r--r-- | src/libexpr/eval-settings.hh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libexpr/eval-settings.hh b/src/libexpr/eval-settings.hh index 049f42e70..7a92b9728 100644 --- a/src/libexpr/eval-settings.hh +++ b/src/libexpr/eval-settings.hh @@ -111,6 +111,9 @@ struct EvalSettings : Config Setting<bool> traceVerbose{this, false, "trace-verbose", "Whether `builtins.traceVerbose` should trace its first argument when evaluated."}; + + Setting<unsigned int> maxCallDepth{this, 10000, "max-call-depth", + "The maximum function call depth to allow before erroring."}; }; extern EvalSettings evalSettings; |