From b8da8b6ea2defe1bbd6147d5080cce8785716f9d Mon Sep 17 00:00:00 2001 From: ValarDragon Date: Thu, 21 Jan 2021 03:20:01 -0600 Subject: [PATCH 1/2] Switch to panic='abort' for safety across FFI boundaries Thanks to @daira for pointing out the security impact, and @jon-chuang for raising the issue / pointing out perf improvements. This still needs to be done in downstream repositories, as this change only applies to the top level crate. --- Cargo.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index b2624cbbd..215068eec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,6 +19,7 @@ members = [ opt-level = 3 lto = "thin" incremental = true +panic = 'abort' [profile.bench] opt-level = 3 @@ -30,6 +31,7 @@ debug-assertions = false [profile.dev] opt-level = 0 +panic = 'abort' [profile.test] opt-level = 3 From 56efaa4f7bdc4bab3e07b8d6addc14e0fe9831db Mon Sep 17 00:00:00 2001 From: ValarDragon Date: Thu, 21 Jan 2021 03:28:01 -0600 Subject: [PATCH 2/2] Apply changelog update --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 966853c76..9177ede75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -86,5 +86,6 @@ The main features of this release are: whose leading coefficients cancel. - #160 (ark-serialize, ark-ff, ark-ec) Support serializing when `MODULUS_BITS + FLAG_BITS` is greater than the multiple of 8 just greater than `MODULUS_BITS`, which is the case for the Pasta curves (fixes #47). - #165 (ark-ff) Enforce in the type system that an extension fields `BaseField` extends from the correct `BasePrimeField`. +- #184 Compile with `panic='abort'` in release mode, for safety of the library across FFI boundaries. ## v0.1.0 (Initial release of arkworks/algebra)