Bernd Walter <[email protected]> writes: > Dag-Erling Smørgrav <[email protected]> writes: > > Bernd Walter <[email protected]> writes: > > > I'm not sure when removing a memset is allowed. > > Always, if the compiler can determine that the data will not be used > > later. > I'm at least sure that the compiler can't if it is linked from another > object file.
When running in hosted mode, the compiler can *always* inline a memset() call or eliminate it if it can determine that the result is not used. > The problem with memset is that the compiler has an internal > implementation. That's a feature, not a problem. > On the other hand I wonder what the deep sense is to clear memory > which is unused later. I know that crypto code can be tricky > sometimes, but if someone is willing to explain the specific reason my > curiosity would be satified. You always overwrite passphrases, keys etc. as soon as you're done with them so they don't end up in a crash dump or on a swap disk or something. DES -- Dag-Erling Smørgrav - [email protected] _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "[email protected]"
