Open dlangBugzillaToGithub opened 11 years ago
+1, this is essential for resilient crypto code.
So who wants to implement it?
(In reply to Walter Bright from comment #2)
> So who wants to implement it?
How do you like to implement it? As a special case, or introducing some kind of generic and reusable annotation, like @keep_function that tells the D compiler to never optimize away the calls to a specific function? I don't know what other cases there are of functions that must never be removed.
(In reply to bearophile_hugs from comment #3)
> (In reply to Walter Bright from comment #2)
> > So who wants to implement it?
>
> How do you like to implement it? As a special case, or introducing some kind
> of generic and reusable annotation, like @keep_function that tells the D
> compiler to never optimize away the calls to a specific function? I don't
> know what other cases there are of functions that must never be removed.
volatileMemset
volatileMemset() should call the C memset_s() function, if that function exists.
Also, there should be a zeroRegisters() function that zeros out all the scratch registers.
I believe this should be in the runtime rather than phobos, primarily because
it is very dependent on the specific architecture in use.
bearophile_hugs reported this on 2013-07-17T04:30:49Z
Transfered from https://issues.dlang.org/show_bug.cgi?id=10661
CC List
Description