This question may be silly but i will ask it anyway.
I've heard about branch prediction from this Mysticial's answer
and i want to know if it is possible for the following to happen
Lets say i have this piece of C++ code
while(memoryAddress = getNextAddress()){
if(haveAccess(memoryAddress))
// change the value of *memoryAdrress
else
// do something else
}
So if the branch predictor predicts wrongly in some case that the if statement is true and then the program change the value of *memoryAddress can bad happen out of that? Can things like segmentation fault happen?