1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00
putty-source/cmake
Simon Tatham 395c228bee Adopt a new universal implementation of smemclr().
This new implementation uses the same optimisation-barrier technique
that I used in various places in testsc: have a no-op function, and a
volatile function pointer pointing at it, and then call through the
function pointer, so that nothing actually happens (apart from the
physical call and return) but the compiler has to assume that
_anything_ might have happened.

Doing this just after a memset enforces that the compiler can't have
thrown away the memset, because the called function might (for
example) check that all the memory really is zero and abort if not.

I've been turning this over in my mind ever since coming up with the
technique for testsc. I think it's far more robust than the previous
smemclr technique: so much so that I'm switching to using it
_everywhere_, and no longer using platform alternatives like Windows's
SecureZeroMemory().
2021-04-18 08:30:44 +01:00
..
platforms Adopt a new universal implementation of smemclr(). 2021-04-18 08:30:44 +01:00
cmake.h.in Fix a few cmake configure-time checks. 2021-04-17 22:26:00 +01:00
gitcommit.cmake Replace mkfiles.pl with a CMake build system. 2021-04-17 13:53:02 +01:00
gtk.cmake Replace mkfiles.pl with a CMake build system. 2021-04-17 13:53:02 +01:00
licence.cmake Replace mkfiles.pl with a CMake build system. 2021-04-17 13:53:02 +01:00
setup.cmake Replace mkfiles.pl with a CMake build system. 2021-04-17 13:53:02 +01:00
toolchain-mingw.cmake Replace mkfiles.pl with a CMake build system. 2021-04-17 13:53:02 +01:00
toolchain-winegcc.cmake Replace mkfiles.pl with a CMake build system. 2021-04-17 13:53:02 +01:00
winegcc Replace mkfiles.pl with a CMake build system. 2021-04-17 13:53:02 +01:00