It's possible for this test not to pass if the libc used does not provide unwind info for raise. We can replace it with __builtin_cast, which can lead to a SIGTRAP on x86_64 and a SIGILL on aarch64.
Using this alternative, a nop is needed before the __builtin_cast. This is because libunwind incorrectly decrements pc, which can cause pc to jump into the previous function and use the incorrect FDE.
craching_lead_func could become a function with only 1 or 2 instructions ( just brk or brk+ret).
The first instruction is where unwind restores the pc but later it adjusts so it will point to the previous function actually so wrong FDE will be used for the unwinding which causes the skipped frames.
https://github.com/llvm/llvm-project/blob/main/libunwind/src/UnwindCursor.hpp#L1933
this "nop" is just a workaround which IMHO fine for now.
unwind may need to differentiate between the sync and async unwind cases.