You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pulley and s390x don't correctly handle the youngest frame in a stack-overflow trace #14597
#[wasmtime_test]fntest_trap_stack_overflow_mutual_recursion(config:&mutConfig) -> Result<()>{let max_frames = NonZeroUsize::new(32).unwrap();let wat = r#" (module $rec_mod (func $even (export "even") (call $odd)) (func $odd (call $even)) ) "#;
config.wasm_backtrace_max_frames(Some(max_frames));let engine = Engine::new(&config)?;let module = Module::new(&engine, wat)?;letmut store = Store::new(&engine,());let instance = Instance::new(&mut store,&module,&[])?;let even = instance.get_typed_func::<(),()>(&mut store,"even")?;let e = even.call(&mut store,()).unwrap_err();// No frame may be skipped, so the frames must alternate between the two// functions.let trace = e.downcast_ref::<WasmBacktrace>().unwrap().frames();assert_eq!(trace.len(), max_frames.get());for pair in trace.windows(2){assert_ne!(pair[0].func_index(), pair[1].func_index(),"{trace:?}");}assert_eq!(e.downcast::<Trap>()?,Trap::StackOverflow);Ok(())}
passes on all platforms except s390x and Pulley. Neither of them handle stack overflow in such a way where the final frame on the stack is the frame that actually caused the stack overflow. This is a relatively minor issue, but it'd be nice to fix to help for attribution of stack overflows.
Activity
Backtraces: handle stack-walking on stack overflow properly on s390x/…
Backtraces: handle stack-walking on stack overflow properly on s390x/…