laanwj on Nostr: that's just not true, bitcoin core developers were well aware of the edge cases of ...
that's just not true, bitcoin core developers were well aware of the edge cases of memset-before-deallocation for a long time
here's the commit from 2012 that introduces use of OPENSSL_cleanse() instead of memset:
https://github.com/bitcoin/bitcoin/commit/0f8a6477825fbaad0d37233bdd3011d748f607ab
in addition to cleaning up, secure_allocator uses a pool of locked memory to keep wallet keys and such out of swap space
memset, where it is used for cleaning up keys, is used with an extra memory barrier to prevent it from being optimized away. this is the same method used many other libraries such as BoringSSL as well and even the linux kernel
here's the commit from 2012 that introduces use of OPENSSL_cleanse() instead of memset:
https://github.com/bitcoin/bitcoin/commit/0f8a6477825fbaad0d37233bdd3011d748f607ab
in addition to cleaning up, secure_allocator uses a pool of locked memory to keep wallet keys and such out of swap space
memset, where it is used for cleaning up keys, is used with an extra memory barrier to prevent it from being optimized away. this is the same method used many other libraries such as BoringSSL as well and even the linux kernel