@BRIAN_____ according to Colin Percival you can say the same thing about memset_s. http://www.daemonology.net/blog/2014-09-06-zeroing-buffers-is-insufficient.html …
-
-
Replying to @volatile_void
@BRIAN_____ Looking at the generated assembly. “volatile” can make the difference between code that works as intended now and what we have.1 reply 0 retweets 0 likes -
Replying to @volatile_void
@spun_off You mean that `volatile` is more effective than `memset_s`?
2 replies 0 retweets 0 likes -
Replying to @BRIAN_____
@BRIAN_____ @spun_off I'd generally trust the pointer-to-volatile code, the GCC/LLVM folks have worked really hard to fix volatile bugs1 reply 0 retweets 0 likes -
Replying to @johnregehr
@johnregehr @spun_off AFAICT, the compiler is allowed to recognize when the pointed-at thing isn't actually volatile. That makes me nervous.2 replies 0 retweets 0 likes -
Replying to @BRIAN_____
@BRIAN_____ When lv is volatile in “lv = …;”, it means that the write is an observable side-effect and must happen in correct order wrt …2 replies 0 retweets 0 likes -
Replying to @volatile_void
@spun_off Only if it points to a volatile object, right?
1 reply 0 retweets 1 like -
Replying to @BRIAN_____
@BRIAN_____ Yes, I see now that the intent of std is that “volatile” must be applied to the object, not as an afterthought to the pointer.1 reply 0 retweets 1 like -
Replying to @volatile_void
@BRIAN_____ It's “volatile object” all over the standard and “volatile lvalue” only by exception.1 reply 0 retweets 0 likes -
Replying to @volatile_void
@spun_off That's my understanding. Pointer-to-volatile at most *preserves* the `volatilie` of the pointed-at thing; it doesn't add it.
2 replies 0 retweets 1 like
@spun_off Given that, I think it becomes much more clear why memset_s is so important. It is specified much more strictly. /cc @johnregehr
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.