diff --git a/CHANGELOG.md b/CHANGELOG.md index 620f6bd27cc..a3696a61ff5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## **[Unreleased]** +- [#1161](https://github.com/wasmerio/wasmer/pull/1161) Require imported functions to be `Send`. This is a breaking change that fixes a soundness issue in the API. - [#1129](https://github.com/wasmerio/wasmer/pull/1129) Standard exception types for singlepass backend. - [#1140](https://github.com/wasmerio/wasmer/pull/1140) Use [`blake3`](https://github.com/BLAKE3-team/BLAKE3) as default hashing algorithm for caching. diff --git a/lib/runtime-core/src/typed_func.rs b/lib/runtime-core/src/typed_func.rs index 9de9d40e2e3..f0c22c31d1b 100644 --- a/lib/runtime-core/src/typed_func.rs +++ b/lib/runtime-core/src/typed_func.rs @@ -430,7 +430,7 @@ macro_rules! impl_traits { $( $x: WasmExternType, )* Rets: WasmTypeList, Trap: TrapEarly, - FN: Fn(&mut vm::Ctx $( , $x )*) -> Trap + 'static, + FN: Fn(&mut vm::Ctx $( , $x )*) -> Trap + 'static + Send, { #[allow(non_snake_case)] fn to_raw(self) -> (NonNull, Option>) { @@ -545,7 +545,7 @@ macro_rules! impl_traits { $( $x: WasmExternType, )* Rets: WasmTypeList, Trap: TrapEarly, - FN: Fn($( $x, )*) -> Trap + 'static, + FN: Fn($( $x, )*) -> Trap + 'static + Send, { #[allow(non_snake_case)] fn to_raw(self) -> (NonNull, Option>) {