Skip to content

Infinite loops between extensions objects cause stack overflow #16

Description

@jbearer

ExecuteSend does not allocate a frame on the interpreter stack when the receiver is an extension, but sends to extensions do allocate space on the C runtime stack. Therefore, infinite loops where the receiver is always an extension object will overflow the runtime stack without overflowing the interpret stack, leading to undetected stack overflow and a segfault.

We should detect such infinite loops and error with -floop-errors when possible. When it is not possible to detect such a loop, we should ensure that it at least does not crash the interpreter, by charging sends to extension objects for some nonzero amount of interpreter stack space as fuel.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions