Closed bhelyer closed 6 years ago
Nice find!
The change looks good, when building with optimizations that call should be turned into a tailcall and not allocate anymore stack space. But for non-optimized builds it will not and as you noted go explody.
While working on VLS I encountered an infinite loop situation fairly far down in the stack. While the infinite loop was a bug, it caused a crash in the GC due to a stack overflow, in particular
pruneUsedSlabs
was being called many many times. The function after this PR is still recursive, just less so.Everything works over here (tm), but GC changes can be messy so I figured I would turn it into a PR rather than setting everything on fire as the last thing I did in my work week. So here we are.