From 8a4e93c0f49f735f006a06606c088fa996313de8 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Fri, 12 Mar 2021 16:31:28 +0100 Subject: [PATCH] fibers: use a breakpoint instruction after the final call in wasmtime_fiber_start --- crates/fiber/src/arch/aarch64.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/fiber/src/arch/aarch64.S b/crates/fiber/src/arch/aarch64.S index f38be926b260..37e9bc57fb19 100644 --- a/crates/fiber/src/arch/aarch64.S +++ b/crates/fiber/src/arch/aarch64.S @@ -107,9 +107,9 @@ FUNCTION(wasmtime_fiber_start): // ... and then we call the function! Note that this is a function call so // our frame stays on the stack to backtrace through. blr x20 - // .. technically we shouldn't get here, and I would like to write in an - // instruction which just aborts, but I don't know such an instruction in - // aarch64 land. + // Unreachable, here for safety. This should help catch unexpected behaviors. + // Use a noticeable payload so one can grep for it in the codebase. + brk 0xf1b3 .cfi_endproc SIZE(wasmtime_fiber_start)