prevent inlining of prune when explicit_clear is enabled on nightly builds to prevent clflush asm being inlined

transfer
Avril 4 years ago
parent f69abd2b04
commit a12a20c410
Signed by: flanchan
GPG Key ID: 284488987C31F630

2
Cargo.lock generated

@ -34,7 +34,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chacha20"
version = "1.1.0"
version = "1.1.1"
dependencies = [
"base64",
"getrandom",

@ -1,7 +1,7 @@
[package]
name = "chacha20"
description = "chacha20_poly1305 encryption tool"
version = "1.1.0"
version = "1.1.1"
authors = ["Avril <flanchan@cumallover.me>"]
edition = "2018"
license = "gpl-3.0-or-later"

@ -97,6 +97,7 @@ where W: Write
/// Clear the internal buffer while keeping it allocated for further use.
///
/// This does not affect operations at all, all it does is 0 out the left-over temporary buffer from the last operation(s).
#[cfg_attr(all(nightly, feature="explicit_clear"), inline(never))] // We don't want this asm! being inlined and preventing other optimisations on caller functions.
pub fn prune(&mut self)
{
#[cfg(feature="explicit_clear")]

Loading…
Cancel
Save