Spectre
- Tags
- security
Is a computer-bug exploiting out-of-order executions. It happens when instructions that otherwise would not be executed are speculatively executed due to our of order instruction execution.
char *a[10];
for (int i = 10; i != 1; --i) {
a[i] = calloc(1, 1);
}
a[0] = 0xCAFE;
int val;
int j = 10; // This will be in a register
int i = 10; // This will be in main memory
for (int i = 10; i != 0; --i, --j) {
if (i) {
val = *a[j];
}
}