aptos-core icon indicating copy to clipboard operation
aptos-core copied to clipboard

[Bug][move-compiler-v2] add a check for maximum expression depth

Open brmataptos opened this issue 8 months ago • 0 comments

🐛 Bug

We should avoid an OOS failure of the compiler and instead add a check for expression nesting depth when building the model (or maybe even earlier, in the parser) to some reasonable value and issue a sensible error message rather than fail in the expression translator.

We can probably have the ExpressionTranslator object track depth with a mutable field and just increment and decrement it on some key recursive function entry/return pairs.

brmataptos avatar May 28 '24 19:05 brmataptos