Microsoft compiler fix for applications likely to be affected by the Spectre issuehttps://blogs.msdn.microsoft.com/vcblog/2018/01/15/spectre-mitigations-in-msvc/ …
-
Show this thread
-
The tl;dr is the compiler adds LFENCE (or equiv) instructions when a conditional block uses a variable both in the condition and as an index into an array or variable.
2 replies 4 retweets 21 likesShow this thread -
Replying to @pwnallthethings
How does this work when it can't see the use? For example: if (extern_predicate_depending_on_extern_x()) z=y[x];
1 reply 0 retweets 0 likes -
Replying to @RichFelker @pwnallthethings
This suggests data can be loaded into cache. Assume the fence will stop any comparison of the cached data http://www.felixcloutier.com/x86/LFENCE.html pic.twitter.com/wAxMOvP7gr
1 reply 0 retweets 0 likes -
Replying to @edeca @pwnallthethings
I mean it can't determine whether the LFENCE is needed in that case. The only safe (but expensive) thing to do would be assume dependency when it can't prove non-dependency.
1 reply 0 retweets 0 likes -
But knowing how MSVC tends to do stuff I'm pretty sure it's going to do the opposite: only assume dependency when it sees an obvious explicit dependency.
1 reply 0 retweets 0 likes
It wouldn't even surprise me if they just grepped the token list inside the controlling expression for the identifier...
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.