Stream: wasmtime

Topic: stack overflow


view this post on Zulip Dan Gohman (Apr 20 2020 at 15:19):

@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?

view this post on Zulip Dan Gohman (Apr 20 2020 at 15:20):

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.

view this post on Zulip Alex Crichton (Apr 20 2020 at 15:29):

@Dan Gohman I believe you're right yeah

view this post on Zulip Alex Crichton (Apr 20 2020 at 15:30):

given how rare stack overflow is in Rust I would probably say we should try to get by without it to start with

view this post on Zulip Alex Crichton (Apr 20 2020 at 15:30):

unless you feel differently though of course

view this post on Zulip Dan Gohman (Apr 20 2020 at 15:34):

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.

view this post on Zulip Dan Gohman (Apr 20 2020 at 15:36):

And I agree with your observation that there's not really a good place to document it.

view this post on Zulip Alex Crichton (Apr 20 2020 at 15:40):

we also already had all the code written for sigaltstack

view this post on Zulip Alex Crichton (Apr 20 2020 at 15:40):

so we could just leave it all in there

view this post on Zulip Alex Crichton (Apr 20 2020 at 15:40):

maybe even with a cfg!(debug_assertions) or something like that

view this post on Zulip Alex Crichton (Apr 20 2020 at 15:40):

if we really felt ambitious

view this post on Zulip Dan Gohman (Apr 20 2020 at 15:41):

I'm leaning towards leaving it all in there. This will also give us more options when we start to explore coroutines / stack switching.

view this post on Zulip Alex Crichton (Apr 20 2020 at 15:41):

man that terrifies me

view this post on Zulip Dan Gohman (Apr 20 2020 at 15:42):

The altstack code, or stack switching? :-)

view this post on Zulip Alex Crichton (Apr 20 2020 at 15:44):

oh the stack switching

view this post on Zulip Alex Crichton (Apr 20 2020 at 15:44):

and/or coroutines proposal for wasm

view this post on Zulip Dan Gohman (Apr 20 2020 at 15:54):

Yeah. And add on-stack suspend-resume, on-stack JIT tiering, and tail-call thunks to taste :-}


Last updated: Nov 22 2024 at 16:03 UTC