alexcrichton opened issue #15284:
This program:
use wasmtime::component::{Component, Linker}; use wasmtime::*; fn main() -> Result<()> { let mut config = Config::new(); config.guest_debug(true); let engine = Engine::new(&config)?; let component = Component::new( &engine, r#"(component (core module $m (func nop)) (export "m" (core module $m)))"#, )?; let mut store = Store::new(&engine, ()); let instance = Linker::new(&engine).instantiate(&mut store, &component)?; let module = instance.get_module(&mut store, "m").unwrap(); store .edit_breakpoints() .unwrap() .add_breakpoint(&module, ModulePC::new(0))?; println!("{}", store.as_context().breakpoints().unwrap().count()); Ok(()) }fails with:
$ cargo run thread 'main' panicked at crates/wasmtime/src/runtime/debug.rs:1051:14: Module should not have been removed from Store
This program:
use wasmtime::*; fn main() -> Result<()> { let mut config = Config::new(); config.guest_debug(true); let engine = Engine::new(&config)?; let module = Module::new(&engine, r#"(module (func nop))"#)?; let mut store = Store::new(&engine, ()); Instance::new(&mut store, &module, &[])?; let pc = ModulePC::new(0); store.edit_breakpoints().unwrap().add_breakpoint(&module, pc)?; store.edit_breakpoints().unwrap().add_breakpoint(&module, pc)?; store.edit_breakpoints().unwrap().remove_breakpoint(&module, pc)?; store.edit_breakpoints().unwrap().remove_breakpoint(&module, pc)?; for bp in store.as_context().breakpoints().unwrap() { println!("still set: {:#x}", bp.pc.raw()); } Ok(()) }prints:
$ cargo run still set: 0x17
This program:
use wasmtime::*; fn main() -> Result<()> { let mut config = Config::new(); config.guest_debug(true); let engine = Engine::new(&config)?; let module = Module::new(&engine, r#"(module (func (export "f") nop))"#)?; let mut store = Store::new(&engine, ()); let instance = Instance::new(&mut store, &module, &[])?; let f = instance.get_typed_func::<(), ()>(&mut store, "f")?; let mut edit = store.edit_breakpoints().unwrap(); edit.add_breakpoint(&module, ModulePC::new(0))?; std::mem::forget(edit); f.call(&mut store, ())?; Ok(()) }is killed by SIGSEGV:
$ cargo run $ echo $? 139
alexcrichton added the wasmtime:debugging label to Issue #15284.
Last updated: Nov 19 2026 at 20:05 UTC