@Andy Wortman just wrote up these docs on lucet's killswitch mechanism: https://github.com/bytecodealliance/lucet/blob/master/docs/src/lucet-runtime/killswitch.md
(apropos discussion in the weekly meeting)
cc @Alex Crichton
@Pat Hickey this is a pretty cool writeup, thanks for sharing! I think that the support implemented in https://github.com/bytecodealliance/wasmtime/pull/1490 is both sort of orthogonal and related to what y'all are doing.
the main thing I see is that SIGALRM isn't needed with a technique like https://github.com/bytecodealliance/wasmtime/pull/1490 (where the wasm code is instrumented), but otherwise it looks like y'all are handling a lot of the complexity with returning from host calls and interrupting that
that's something that the PR doesn't try to handle at all and leaves up to the embedder, but what y'all are doing makes sense to me
indeed. we have to handle stack overflows in the signal handler as well.
one edge lucet doesn't handle at the moment, which i know we (Alex/i) talked about in a wasmtime issue at some point, is recursive calls into a wasm guest. i'm pretty confident that our approach can be extended to handle that in a straightforward manner, we just haven't had that specific use case as a priority quite yet. i'd be super curious if benchmarks show much difference, whenever in the future that's a straightforward comparison :D
Last updated: Dec 23 2024 at 13:07 UTC