News for hackers. Stuff that matters.
Re:Being Sneaky in C by dezgeg on Friday June 12, 2015 @06:22PM (#9708927)
> Of course there is, you just use the volatile keyword.

Colin Percival of FreeBSD disagrees:

http://www.daemonology.net/blog/2014-09-04-how-to-zero-a-buf...

Re:Being Sneaky in C by TheLoneWolfling on Friday June 12, 2015 @08:01PM (#9709288)
And that doesn't even get into the other aspect of it:

Namely that C / C++ allows temporary copies of variables that are not cleared afterwards. The most obvious case of this being things being temporarily copied into registers / stack, but there are other examples as well.

Re:Being Sneaky in C by kllrnohj on Monday June 15, 2015 @06:55PM (#9722701)
Not really. He just says if the compiler can optimize away prior to it being declared volatile.