(info: &core::panic::PanicInfo)
| 46 | /* Best-effort panic-to-stash so the host gets a typed message instead of an opaque trap. Re-entry during the format alloc falls through to unreachable(), same trap as before. */ |
| 47 | #[panic_handler] |
| 48 | fn panic(info: &core::panic::PanicInfo) -> ! { |
| 49 | let msg = alloc::format!("internal panic: {}", info.message()); |
| 50 | with_runtime(|rt| { |
| 51 | rt.error_stash.set(crate::abi::ErrorKind::Runtime as u32, msg); |
| 52 | }); |
| 53 | core::arch::wasm32::unreachable() |
| 54 | } |
| 55 | |
| 56 | pub(super) const SZ: usize = 1 << 20; |
| 57 |
nothing calls this directly
no test coverage detected