Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> A very good reason is that Linux happens to be written in C, which just doesn't support this.

This is a tangent, but I thought that C supported this just fine as long as there was compiler and runtime support? The compiler needs to insert a check at each stack allocation (beginning of each function, or each call to alloca or equivalent), and if it switches your stack pointer, it needs a trampoline as the last frame on the new stack, to un-switch the stack pointer. And you need to teach everything that traces stacks how to keep tracing across segments. But it doesn't seem impossible.

GCC and LLVM seem to have support that doesn't care what language you're using: https://gcc.gnu.org/wiki/SplitStacks http://llvm.org/releases/3.0/docs/SegmentedStacks.html



Fair enough. I wasn't aware that GCC actually supports this in C.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: