Stream: git-wasmtime

Topic: wasmtime / PR #1474 Fuchsia port


view this post on Zulip Wasmtime GitHub notifications bot (Apr 06 2020 at 22:21):

benbrittain opened PR #1474 from master to master:

This is an MVP port for Fuchsia.

There are at least two things that need to be cleaned up in the future:

I know that these syscalls are super unfamiliar so I'm happy to provide context. I've also unfortunately chosen to use the lowest level bindings since they are our most stable interface for out-of-tree Rust code.

cc/ @leecam

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 00:53):

alexcrichton submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 00:53):

alexcrichton submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 00:53):

alexcrichton created PR Review Comment:

To avoid the extra not(...) could this list fuchsia first with // no extensions at this time

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 00:53):

alexcrichton created PR Review Comment:

FWIW this is fine to leave out, this is intended for the API extensions in the wasmtime crate but those were left out, so this could be a noop on fuchsia.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 00:53):

alexcrichton created PR Review Comment:

Mind listing fuchsia first to avoid the extra not(..)?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 00:53):

alexcrichton created PR Review Comment:

FWIW I think this isn't quite right, this is actually only one exception handling thread for the first thread, but no other threads get exception handlers set.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 00:53):

alexcrichton created PR Review Comment:

Some extra tabs sneaking in here?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 00:53):

alexcrichton created PR Review Comment:

Mind throwing this into the general cfg_if block above?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 00:53):

alexcrichton created PR Review Comment:

You may want to leave a TODO here because this won't work in stack overflow situations, only for normal faults. (this is why we use sigaltstack on unix)

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 00:53):

alexcrichton created PR Review Comment:

This can also be done with fuchsia::fault_handler as usize as *const () (no transmute necessary)

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 00:53):

alexcrichton created PR Review Comment:

I think there may need to be some special tidbits when resuming the original thread here? I think you probably want to resume the instruction itself rather than one byte past, and additionally I think something here needs to clean up the stack allocation for the context info, but I'm not sure that anything currently does?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 00:53):

alexcrichton created PR Review Comment:

Should this perhaps have a TODO to do something with handled? If it's false this may infinitely try to handle the fault here?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 00:53):

alexcrichton created PR Review Comment:

Thinking some more about this, is there a syscall or a standard method for "resume this thread given this thread context?" Because you basically want to always resume the exact same instruction in the exact same context (all registers preserved which currently aren't I think), but sometimes you'll unregister the trap handling logic.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 11:32):

benbrittain submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 11:32):

benbrittain created PR Review Comment:

I really wish Fuchsia wasn't marked as a unix

view this post on Zulip Wasmtime GitHub notifications bot (Apr 28 2020 at 18:40):

benbrittain closed without merge PR #1474.


Last updated: Nov 22 2024 at 17:03 UTC