| author | |
| committer | |
| log | 992c02ab95e8297a1558bcf011f15a5cf1cd8e1b |
| tree | 09887b8a4e4b39f8acd85bf0c4849b5413bb34ea |
| parent | 9910bfa6d887cd28dba3ac99ac0f0acf8d6e5056 |
The fallback case was actually switched with the success one.1 files changed, 2 insertions(+), 6 deletions(-)
lib/std/crypto/tlcsprng.zig+2-6| ... | ... | @@ -107,13 +107,9 @@ fn tlsCsprngFill(_: *const std.rand.Random, buffer: []u8) void { |
| 107 | 107 | break :wof; |
| 108 | 108 | } else |_| {} |
| 109 | 109 | |
| 110 | os.madvise( | |
| 111 | wipe_mem.ptr, | |
| 112 | wipe_mem.len, | |
| 113 | os.MADV_WIPEONFORK, | |
| 114 | ) catch { | |
| 110 | if (os.madvise(wipe_mem.ptr, wipe_mem.len, os.MADV_WIPEONFORK)) |_| { | |
| 115 | 111 | return initAndFill(buffer); |
| 116 | }; | |
| 112 | } else |_| {} | |
| 117 | 113 | } |
| 118 | 114 | |
| 119 | 115 | if (std.Thread.use_pthreads) { |