Skip to content

Commit

Permalink
Abort upon panic
Browse files Browse the repository at this point in the history
Abort processes upon panic is safer than the default "unwind" stack strategy.
For example, it prevents tokio from catching panics from spawned tasks.
  • Loading branch information
pavel-kokolemin committed Feb 14, 2023
1 parent db05fa8 commit 0af1fe0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 0af1fe0

Please sign in to comment.