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

Function large_add_chain_no_stack_overflow

tests/all/module.rs:247–266  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

245#[test]
246#[cfg_attr(miri, ignore)]
247fn large_add_chain_no_stack_overflow() -> Result<()> {
248 let mut config = Config::new();
249 config.cranelift_opt_level(OptLevel::None);
250 let engine = Engine::new(&config)?;
251 let mut wat = String::from(
252 "
253 (module
254 (func (result i64)
255 (i64.const 1)
256 ",
257 );
258 for _ in 0..20_000 {
259 wat.push_str("(i64.add (i64.const 1))\n");
260 }
261
262 wat.push_str(")\n)");
263 Module::new(&engine, &wat)?;
264
265 Ok(())
266}
267
268#[test]
269fn compile_a_component() -> Result<()> {

Callers

nothing calls this directly

Calls 5

fromFunction · 0.85
OkFunction · 0.85
newFunction · 0.50
cranelift_opt_levelMethod · 0.45
push_strMethod · 0.45

Tested by

no test coverage detected