diff --git a/lib/std/crypto.zig b/lib/std/crypto.zig index 1a839f0c94ee24ea58f6e2a521f57649dba1bf59..169db27817a301eec4b7bb02aef2d9e6b7dc4c68 100644 --- a/lib/std/crypto.zig +++ b/lib/std/crypto.zig @@ -417,6 +417,8 @@ test "issue #4532: no index out of bounds" { /// Sets a slice to zeroes. /// Prevents the store from being optimized out. +/// Does not clear copies in registers or elsewhere in memory. +/// Wiping a value held in registers can force an extra copy into memory. pub fn secureZero(comptime T: type, s: []volatile T) void { @memset(s, std.mem.zeroes(T)); }