MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / shared_memory_failed_creation

Function shared_memory_failed_creation

tests/all/threads.rs:28–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26#[test]
27#[cfg_attr(miri, ignore)]
28fn shared_memory_failed_creation() -> Result<()> {
29 let mut config = Config::new();
30 config.wasm_threads(true);
31 config.shared_memory(false);
32 let Ok(engine) = Engine::new(&config) else {
33 return Ok(());
34 };
35 assert!(SharedMemory::new(&engine, MemoryType::shared(1, 1)).is_err());
36 let wat = r#"(module (memory 1 1 shared))"#;
37 let module = Module::new(&engine, wat)?;
38 let mut store = Store::new(&engine, ());
39 assert!(Instance::new(&mut store, &module, &[]).is_err());
40 Ok(())
41}
42
43#[test]
44#[cfg_attr(miri, ignore)]

Callers

nothing calls this directly

Calls 4

OkFunction · 0.85
newFunction · 0.50
wasm_threadsMethod · 0.45
shared_memoryMethod · 0.45

Tested by

no test coverage detected