Stream: git-wasmtime

Topic: wasmtime / PR #1843 Remove custom signal handler restrict...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 08 2020 at 15:52):

lostman opened PR #1843 from remove-custom-signal-handler-restrictions to master:

PR https://github.com/bytecodealliance/wasmtime/pull/1577 introduced restrictions on handling signals originating from outside of the Wasm code.

Currently these restrictions also apply to custom signal handlers. This is quite limiting and breaks our use-case. We use a custom signal handler to track memory accesses in a manner similar to
https://github.com/bytecodealliance/wasmtime/blob/15c68f2cc15709c65a7838c3c3641f716373d01c/tests/all/custom_signal_handler.rs#L75

However, in our code the signal can originate both from Wasm code and from hostcalls. PR#1577 only the former works.

This PR makes the signal origin check run after executing the custom signal handler. This maintains the spirit of PR#1577 while restoring the flexibility of handling any signals from custom signal handlers.

This PR also adds a hostcall test case.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 08 2020 at 16:08):

lostman updated PR #1843 from remove-custom-signal-handler-restrictions to master:

PR https://github.com/bytecodealliance/wasmtime/pull/1577 introduced restrictions on handling signals originating from outside of the Wasm code.

Currently these restrictions also apply to custom signal handlers. This is quite limiting and breaks our use-case. We use a custom signal handler to track memory accesses in a manner similar to
https://github.com/bytecodealliance/wasmtime/blob/15c68f2cc15709c65a7838c3c3641f716373d01c/tests/all/custom_signal_handler.rs#L75

However, in our code the signal can originate both from Wasm code and from hostcalls. PR#1577 only the former works.

This PR makes the signal origin check run after executing the custom signal handler. This maintains the spirit of PR#1577 while restoring the flexibility of handling any signals from custom signal handlers.

This PR also adds a hostcall test case.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 08 2020 at 16:43):

alexcrichton submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 08 2020 at 17:33):

alexcrichton merged PR #1843.


Last updated: Oct 23 2024 at 20:03 UTC