diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-05-05 18:43:21 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-05-05 18:43:21 +0300 |
commit | 815e6239a529ed1ba367b0647c7f971bae282109 (patch) | |
tree | de7b2aaf54be2d60ced19cce18a48585fb5105e9 /src/GCodes/GCodeBuffer/ExpressionParser.h | |
parent | 7644946ad0bcf42f016fc7a53da13e71339d8282 (diff) |
Added stack check to some recursive functions
Diffstat (limited to 'src/GCodes/GCodeBuffer/ExpressionParser.h')
-rw-r--r-- | src/GCodes/GCodeBuffer/ExpressionParser.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/GCodes/GCodeBuffer/ExpressionParser.h b/src/GCodes/GCodeBuffer/ExpressionParser.h index e504bed7..778a5b22 100644 --- a/src/GCodes/GCodeBuffer/ExpressionParser.h +++ b/src/GCodes/GCodeBuffer/ExpressionParser.h @@ -45,7 +45,9 @@ private: void ConvertToFloat(ExpressionValue& val, bool evaluate) const THROWS(GCodeException); void ConvertToBool(ExpressionValue& val, bool evaluate) const THROWS(GCodeException); - void ConvertToString(ExpressionValue& val, bool evaluate) THROWS(GCodeException); + void ConvertToString(ExpressionValue& val, bool evaluate) noexcept; + + void CheckStack(uint32_t calledFunctionStackUsage) const THROWS(GCodeException); // The following must be declared 'noinline' because it allocates a large buffer on the stack and its caller is recursive static void __attribute__((noinline)) StringConcat(ExpressionValue &val, ExpressionValue &val2) noexcept; |