From a4c2b3ae304dc53e8e52cc952383b5171ce00b99 Mon Sep 17 00:00:00 2001 From: Ben Bridle Date: Wed, 15 Oct 2025 13:25:28 +1300 Subject: Raise an error if recursion depth exceeds a maximum value This is preferable to having the assembler crash with a stack overflow error, because the user can now see which invocation caused the overflow. --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 9b9b87a..09e2fbb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,5 @@ const MAX_ITERATIONS_TO_STABILISE: usize = 4; +const MAX_RECURSION_DEPTH: usize = 1024; mod stages; mod types; -- cgit v1.2.3-70-g09d2