Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite loops between extensions objects cause stack overflow #16

Open
jbearer opened this issue Oct 13, 2021 · 0 comments
Open

Infinite loops between extensions objects cause stack overflow #16

jbearer opened this issue Oct 13, 2021 · 0 comments
Labels
bug Something isn't working component:interpreter

Comments

@jbearer
Copy link
Owner

jbearer commented Oct 13, 2021

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.

@jbearer jbearer added bug Something isn't working component:interpreter labels Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component:interpreter
Projects
None yet
Development

No branches or pull requests

1 participant