I wonder whether having the language know about array bounds (i.e. memory safety) makes it easier to deploy mitigations against Spectre…
I’m not sure what you’re saying here. Presumably .get(i) would also load without speculation, right?
-
-
Well, .get(i) doesn't load (returns Option<&T>), but .cloned() and .map(|x| *x) do when combined with it, and while they can be separated in the source, LLVM can still optimize it into the problematic instruction patterns.
-
Well, presumably LLVM’s optzns would need to become aware of “load nospeculate”. Or maybe nospeculate should be a flag on pointer types?
- 3 more replies
New conversation -
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.