From fecd583c0e7e580f07d81b24b1a3522c52938c61 Mon Sep 17 00:00:00 2001 From: cypherpunks Date: Sat, 18 Aug 2018 19:18:48 +0000 Subject: rust: abort on panic in all profiles Until https://github.com/rust-lang/rust/issues/52652 is fixed, unwinding on panic is potentially unsound in a mixed C/Rust codebase. The codebase is supposed to be panic-free already, but just to be safe. This started mattering at commit d1820c1516a31a149fc51a9e5126bf899e4c4e08. Fixes #27199; bugfix on tor-0.3.3.1-alpha. --- src/rust/Cargo.toml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/rust/Cargo.toml b/src/rust/Cargo.toml index 953c9b96b7..c22eea984d 100644 --- a/src/rust/Cargo.toml +++ b/src/rust/Cargo.toml @@ -1,7 +1,17 @@ [workspace] members = ["tor_util", "protover", "smartlist", "external", "tor_allocate", "tor_rust"] +# Can remove panic="abort" when this issue is fixed: +# https://github.com/rust-lang/rust/issues/52652 +[profile.dev] +panic = "abort" + [profile.release] debug = true panic = "abort" +[profile.test] +panic = "abort" + +[profile.bench] +panic = "abort" -- cgit v1.2.3-54-g00ecf