@Alex Crichton With the Spidermonkey-style stack checks, we no longer need a sigaltstack
, but we could still use one if we wanted to, right?
It's more complexity in the code, and the alternate stack itself takes more memory, but it would mean that users wouldn't ever have to wonder why their programs sometimes crash with SIGSEGV, and I wonder if that's worth it.
@Dan Gohman I believe you're right yeah
given how rare stack overflow is in Rust I would probably say we should try to get by without it to start with
unless you feel differently though of course
I'm not sure. As I was thinking about it over the weekend, I started to worry more about breaking the usual SEGSEGV => safety gap association that one typically has in Rust.
And I agree with your observation that there's not really a good place to document it.
we also already had all the code written for sigaltstack
so we could just leave it all in there
maybe even with a cfg!(debug_assertions)
or something like that
if we really felt ambitious
I'm leaning towards leaving it all in there. This will also give us more options when we start to explore coroutines / stack switching.
man that terrifies me
The altstack code, or stack switching? :-)
oh the stack switching
and/or coroutines proposal for wasm
Yeah. And add on-stack suspend-resume, on-stack JIT tiering, and tail-call thunks to taste :-}
Last updated: Dec 23 2024 at 13:07 UTC