| ... | @@ -117,7 +117,9 @@ fn setupPthreadAtforkAndFill(buffer: []u8) void { | ... | @@ -117,7 +117,9 @@ fn setupPthreadAtforkAndFill(buffer: []u8) void { |
| 117 | } | 117 | } |
| 118 | | 118 | |
| 119 | fn childAtForkHandler() callconv(.C) void { | 119 | fn childAtForkHandler() callconv(.C) void { |
| 120 | const wipe_slice = @ptrCast([*]u8, &wipe_me)[0..@sizeOf(@TypeOf(wipe_me))]; | 120 | // TODO this is a workaround for https://github.com/ziglang/zig/issues/7495 |
| | 121 | var wipe_slice: []u8 = undefined; |
| | 122 | wipe_slice = @ptrCast([*]u8, &wipe_me)[0..@sizeOf(@TypeOf(wipe_me))]; |
| 121 | std.crypto.utils.secureZero(u8, wipe_slice); | 123 | std.crypto.utils.secureZero(u8, wipe_slice); |
| 122 | } | 124 | } |
| 123 | | 125 | |