Stream: general

Topic: Wasm panic=unwind


view this post on Zulip Léo Gaspard (Jan 06 2021 at 13:37):

Is there any way to get panic=unwind behavior on wasm blobs? I'd like to make sure I deallocate the missing memory in case of a trap, because reinitializing the whole wasm module to avoid memory leaks sounds... suboptimal :/

view this post on Zulip bjorn3 (Jan 06 2021 at 14:19):

Webassembly doesn't yet have support for unwinding. I believe there is a proposal for this but I don't know what the status is.

view this post on Zulip Léo Gaspard (Jan 06 2021 at 14:56):

Hmm ok thank you! Guess I'll just eat the memory leak until such a proposal lands and is implemented then, panics are hopefully not going to happen often in the configuration :)

view this post on Zulip Benjamin Bouvier (Jan 06 2021 at 15:31):

There's a proposal for exception handling, but it's not implemented or planned yet in Wasmtime as far as I know. I assume that when it becomes stage 4 in wasm, it'll be a stronger requirement in wasmtime. (See also this issue.)

Proposal to add exception handling to WebAssembly. Contribute to WebAssembly/exception-handling development by creating an account on GitHub.
Feature Cranelift currently doesn't support SEH (but has some support for finally I think). This is a feature request to support properly exception (landingpads on Posix, SEH on windows, maybe ...

view this post on Zulip Léo Gaspard (Jan 06 2021 at 21:30):

Thank you! I'd love for something like that to happen indeed :)


Last updated: Nov 22 2024 at 17:03 UTC