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.
ExecuteSenddoes 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-errorswhen 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.