Bernd Walter <ti...@cicely7.cicely.de> writes: > Dag-Erling Smørgrav <d...@des.no> writes: > > Bernd Walter <ti...@cicely7.cicely.de> 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 - d...@des.no _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"