Merge pull request from GHSA-q879-9g95-56mx
Add an assertion that a `HostFunc`'s `store` agrees on engines
This commit is contained in:
@@ -256,7 +256,7 @@ fn get_host_function() -> Result<()> {
|
||||
|
||||
let mut linker = Linker::new(&engine);
|
||||
linker.func_wrap("mod", "f1", || {})?;
|
||||
let mut store = Store::<()>::default();
|
||||
let mut store = Store::new(&engine, ());
|
||||
assert!(linker
|
||||
.get_by_import(&mut store, &module.imports().nth(0).unwrap())
|
||||
.is_some());
|
||||
|
||||
Reference in New Issue
Block a user