Skip to content

Stackoverflow not caught by the interpreter #31

@chebureki

Description

@chebureki

A stack overflow is not caught by the interpreter => boom crash panic
Example:

; + operator just so no tailcall optimization will help out
(defun overflow () (+ 1 (overflow)))
(overflow)

Optimally, the interpreter will return an error.
You could add a depth value to the Env struct.
If you try to enter a new env, and the new depth exceeds a maximum stack height, it will return an error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions