From 0af1fe0795965f751a2cfc86563193a1b5dcf195 Mon Sep 17 00:00:00 2001 From: Pavel Kokolemin Date: Sat, 11 Feb 2023 10:29:48 +0300 Subject: [PATCH] Abort upon panic Abort processes upon panic is safer than the default "unwind" stack strategy. For example, it prevents tokio from catching panics from spawned tasks. --- Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 179f913227..55adf194a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -90,7 +90,11 @@ static_assertions = "1.1" thiserror = "1.0" tokio = "1.0" +[profile.dev] +panic = "abort" # prevent panic catching (mostly for the tokio runtime) + [profile.release] +panic = "abort" # prevent panic catching (mostly for the tokio runtime) debug-assertions = true overflow-checks = true