David Schwartz wrote:
On Sat, 23 Nov 2002 09:58:24 +1100, mlh wrote:

The compilers are are throwing away the function
because the result is not used.

Perhaps the only way to future-proof against optimisations
is to ensure it IS used: write the cleared buffer to /dev/null.

Well perhaps not /dev/null but something like that.  A pipe
to another process which just swallows it?

Matt

If this is only done infrequently and mostly on information provided from humans, just sum all the bytes after their cleared and stuff the sum in a global variable.

DS

Is it possible that the compiler would notice that you're
always summing up all zeros, and replace the summing with a single assignment to zero?

And then again remove the clearing / memsetting ?

Sounds feasible.

I really think that whatever you do has to be outside
of the compilers reach.


Matt

______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]

Reply via email to