I'm working on a document about them and I think I understand it general what happens -> by exploiting the CPUs memory caching and speculative execution but I'm a little lost of how protected data is actually exposed.
So if I understand speculative execution correctly in a case of:
if a == true {
firstFunction()
} else {
secondFunction()
}
the CPU will call both first and second function and run them before it knows the value of a? Is it storing the actual values within those functions or just their memory locations in its cache? And once a is resolved, does it discard anything it obtained from going down the wrong path?
Thanks