aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorMarc Tiehuis <marctiehuis@gmail.com>2018-08-18 12:15:39 +1200
committerMarc Tiehuis <marctiehuis@gmail.com>2018-08-18 12:15:39 +1200
commit53b18b079189cce355767ce4fde4fc586f0d3248 (patch)
tree73602f288599dd105b544b3ea7b4af02cf161623 /src/ir.cpp
parent1da93caced5511d5b2d666fe40c5db108580e2aa (diff)
downloadzig-53b18b079189cce355767ce4fde4fc586f0d3248.tar.gz
zig-53b18b079189cce355767ce4fde4fc586f0d3248.zip
Add secureZero function
This is identical to `mem.set(u8, slice, 0)` except that it will never be optimized out by the compiler. Intended usage is for clearing secret data. The resulting assembly has been manually verified in --release-* modes. It would be valuable to test the 'never be optimized out' claim in tests but this is harder than initially expected due to how much Zig appears to know locally. May be doable with @intToPtr, @ptrToInt to get around known data dependencies but I could not work it out right now.
Diffstat (limited to 'src/ir.cpp')
0 files changed, 0 insertions, 0 deletions