Fix MIR builder me-call recursion and add compile tracing
This commit is contained in:
@ -15,7 +15,7 @@ impl MirInterpreter {
|
||||
) -> Result<VMValue, VMError> {
|
||||
// Safety valve: cap nested exec_function_inner depth to avoid Rust stack overflow
|
||||
// on accidental infinite recursion in MIR (e.g., self-recursive call chains).
|
||||
const MAX_CALL_DEPTH: usize = 1024;
|
||||
const MAX_CALL_DEPTH: usize = 128;
|
||||
self.call_depth = self.call_depth.saturating_add(1);
|
||||
if self.call_depth > MAX_CALL_DEPTH {
|
||||
eprintln!(
|
||||
|
||||
Reference in New Issue
Block a user