3 ms·
Your explanation is amazing. Thanks How would this happen in practice? > To "mispredict" an unconditional jump for example all it takes is to modify the code
by hu3 2y ago
Your explanation is amazing.
Thanks
How would this happen in practice?
> To "mispredict" an unconditional jump for example all it takes is to modify the code so that the instruction points to a different target.
Perhaps a jump to a pointer that changed value? Or maybe JIT code that was optimized during runtime?
- ithkuil 2y agoJumping to a destination via pointer that changed value is a misprediction of an indirect jump and that's common. More uncommon but technically possible is to mispredict a unconditional direct jump. For that to happen the code itself has to change. Indeed JIT is a common cause of mutable code at runtime. But also unmapping a library and remapping another library in the same memory range can also effectively cause the same address to contain a different instruction that the one predicted but the branch prediction logic (likely not even a branch instruction)